From 07274513e984f0b5544586c74508ccd16e7dcafa Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 17:29:19 +1000 Subject: Remove EFL, since it's been released now. --- libraries/evas/src/lib/Evas.h | 12569 ------------------- libraries/evas/src/lib/Evas_GL.h | 1438 --- libraries/evas/src/lib/Makefile.am | 260 - libraries/evas/src/lib/Makefile.in | 1094 -- libraries/evas/src/lib/cache/Makefile.am | 26 - libraries/evas/src/lib/cache/Makefile.in | 686 - libraries/evas/src/lib/cache/evas_cache.h | 175 - .../evas/src/lib/cache/evas_cache_engine_image.c | 703 -- libraries/evas/src/lib/cache/evas_cache_image.c | 1428 --- libraries/evas/src/lib/cache/evas_preload.c | 266 - libraries/evas/src/lib/canvas/Makefile.am | 67 - libraries/evas/src/lib/canvas/Makefile.in | 763 -- libraries/evas/src/lib/canvas/evas_async_events.c | 173 - libraries/evas/src/lib/canvas/evas_callbacks.c | 543 - libraries/evas/src/lib/canvas/evas_clip.c | 321 - libraries/evas/src/lib/canvas/evas_data.c | 72 - libraries/evas/src/lib/canvas/evas_events.c | 1867 --- libraries/evas/src/lib/canvas/evas_filter.c | 1427 --- libraries/evas/src/lib/canvas/evas_focus.c | 61 - libraries/evas/src/lib/canvas/evas_font_dir.c | 1349 -- libraries/evas/src/lib/canvas/evas_gl.c | 272 - libraries/evas/src/lib/canvas/evas_key.c | 245 - libraries/evas/src/lib/canvas/evas_key_grab.c | 179 - libraries/evas/src/lib/canvas/evas_layer.c | 193 - libraries/evas/src/lib/canvas/evas_main.c | 710 -- libraries/evas/src/lib/canvas/evas_map.c | 1037 -- libraries/evas/src/lib/canvas/evas_name.c | 72 - libraries/evas/src/lib/canvas/evas_object_box.c | 2127 ---- libraries/evas/src/lib/canvas/evas_object_grid.c | 465 - libraries/evas/src/lib/canvas/evas_object_image.c | 3957 ------ libraries/evas/src/lib/canvas/evas_object_inform.c | 79 - .../evas/src/lib/canvas/evas_object_intercept.c | 585 - libraries/evas/src/lib/canvas/evas_object_line.c | 461 - libraries/evas/src/lib/canvas/evas_object_main.c | 1398 --- .../evas/src/lib/canvas/evas_object_polygon.c | 554 - .../evas/src/lib/canvas/evas_object_rectangle.c | 387 - libraries/evas/src/lib/canvas/evas_object_smart.c | 951 -- .../src/lib/canvas/evas_object_smart_clipped.c | 183 - libraries/evas/src/lib/canvas/evas_object_table.c | 1373 -- libraries/evas/src/lib/canvas/evas_object_text.c | 1943 --- .../evas/src/lib/canvas/evas_object_textblock.c | 10052 --------------- libraries/evas/src/lib/canvas/evas_rectangle.c | 98 - libraries/evas/src/lib/canvas/evas_render.c | 1914 --- libraries/evas/src/lib/canvas/evas_smart.c | 266 - libraries/evas/src/lib/canvas/evas_stack.c | 391 - libraries/evas/src/lib/canvas/evas_stats.c | 185 - libraries/evas/src/lib/canvas/evas_touch_point.c | 110 - libraries/evas/src/lib/cserve/Makefile.am | 32 - libraries/evas/src/lib/cserve/Makefile.in | 692 - libraries/evas/src/lib/cserve/evas_cs.h | 285 - libraries/evas/src/lib/cserve/evas_cs_client.c | 528 - libraries/evas/src/lib/cserve/evas_cs_main.c | 9 - libraries/evas/src/lib/cserve/evas_cs_mem.c | 168 - libraries/evas/src/lib/cserve/evas_cs_server.c | 380 - libraries/evas/src/lib/engines/Makefile.am | 16 - libraries/evas/src/lib/engines/Makefile.in | 740 -- libraries/evas/src/lib/engines/common/Makefile.am | 118 - libraries/evas/src/lib/engines/common/Makefile.in | 1009 -- libraries/evas/src/lib/engines/common/evas_blend.h | 8 - .../evas/src/lib/engines/common/evas_blend_main.c | 325 - .../src/lib/engines/common/evas_blend_private.h | 31 - .../evas/src/lib/engines/common/evas_blit_main.c | 700 -- .../src/lib/engines/common/evas_convert_color.c | 246 - .../src/lib/engines/common/evas_convert_color.h | 16 - .../lib/engines/common/evas_convert_colorspace.c | 186 - .../lib/engines/common/evas_convert_colorspace.h | 12 - .../src/lib/engines/common/evas_convert_gry_1.c | 6 - .../src/lib/engines/common/evas_convert_gry_1.h | 9 - .../src/lib/engines/common/evas_convert_gry_4.c | 10 - .../src/lib/engines/common/evas_convert_gry_4.h | 9 - .../src/lib/engines/common/evas_convert_gry_8.c | 78 - .../src/lib/engines/common/evas_convert_gry_8.h | 12 - .../src/lib/engines/common/evas_convert_grypal_6.c | 23 - .../src/lib/engines/common/evas_convert_grypal_6.h | 6 - .../src/lib/engines/common/evas_convert_main.c | 632 - .../src/lib/engines/common/evas_convert_main.h | 9 - .../src/lib/engines/common/evas_convert_rgb_16.c | 2089 --- .../src/lib/engines/common/evas_convert_rgb_16.h | 50 - .../src/lib/engines/common/evas_convert_rgb_24.c | 89 - .../src/lib/engines/common/evas_convert_rgb_24.h | 10 - .../src/lib/engines/common/evas_convert_rgb_32.c | 625 - .../src/lib/engines/common/evas_convert_rgb_32.h | 24 - .../src/lib/engines/common/evas_convert_rgb_8.c | 248 - .../src/lib/engines/common/evas_convert_rgb_8.h | 14 - .../evas/src/lib/engines/common/evas_convert_yuv.c | 1258 -- .../evas/src/lib/engines/common/evas_convert_yuv.h | 9 - libraries/evas/src/lib/engines/common/evas_cpu.c | 274 - libraries/evas/src/lib/engines/common/evas_draw.h | 36 - .../evas/src/lib/engines/common/evas_draw_main.c | 691 - libraries/evas/src/lib/engines/common/evas_font.h | 76 - .../lib/engines/common/evas_font_default_walk.x | 144 - .../evas/src/lib/engines/common/evas_font_draw.c | 658 - .../evas/src/lib/engines/common/evas_font_load.c | 925 -- .../evas/src/lib/engines/common/evas_font_main.c | 545 - .../evas/src/lib/engines/common/evas_font_ot.c | 336 - .../evas/src/lib/engines/common/evas_font_ot.h | 45 - .../src/lib/engines/common/evas_font_private.h | 52 - .../evas/src/lib/engines/common/evas_font_query.c | 789 -- libraries/evas/src/lib/engines/common/evas_image.h | 63 - .../evas/src/lib/engines/common/evas_image_data.c | 151 - .../evas/src/lib/engines/common/evas_image_load.c | 385 - .../evas/src/lib/engines/common/evas_image_main.c | 889 -- .../src/lib/engines/common/evas_image_private.h | 17 - .../evas/src/lib/engines/common/evas_image_save.c | 51 - .../src/lib/engines/common/evas_image_scalecache.c | 844 -- libraries/evas/src/lib/engines/common/evas_line.h | 11 - .../evas/src/lib/engines/common/evas_line_main.c | 1029 -- .../evas/src/lib/engines/common/evas_map_image.c | 432 - .../evas/src/lib/engines/common/evas_map_image.h | 10 - .../src/lib/engines/common/evas_map_image_core.c | 226 - .../lib/engines/common/evas_map_image_internal.c | 117 - .../src/lib/engines/common/evas_map_image_loop.c | 116 - .../src/lib/engines/common/evas_op_add/Makefile.am | 13 - .../src/lib/engines/common/evas_op_add/Makefile.in | 547 - .../lib/engines/common/evas_op_add/op_add_color_.c | 33 - .../engines/common/evas_op_add/op_add_color_i386.c | 33 - .../common/evas_op_add/op_add_mask_color_.c | 33 - .../common/evas_op_add/op_add_mask_color_i386.c | 33 - .../lib/engines/common/evas_op_add/op_add_pixel_.c | 33 - .../common/evas_op_add/op_add_pixel_color_.c | 33 - .../common/evas_op_add/op_add_pixel_color_i386.c | 29 - .../engines/common/evas_op_add/op_add_pixel_i386.c | 33 - .../common/evas_op_add/op_add_pixel_mask_.c | 37 - .../common/evas_op_add/op_add_pixel_mask_i386.c | 33 - .../src/lib/engines/common/evas_op_add_main_.c | 541 - .../lib/engines/common/evas_op_blend/Makefile.am | 46 - .../lib/engines/common/evas_op_blend/Makefile.in | 721 -- .../engines/common/evas_op_blend/op_blend_color_.c | 109 - .../common/evas_op_blend/op_blend_color_i386.c | 138 - .../common/evas_op_blend/op_blend_color_neon.c | 223 - .../common/evas_op_blend/op_blend_color_sse3.c | 167 - .../common/evas_op_blend/op_blend_mask_color_.c | 185 - .../evas_op_blend/op_blend_mask_color_i386.c | 251 - .../evas_op_blend/op_blend_mask_color_neon.c | 562 - .../evas_op_blend/op_blend_mask_color_sse3.c | 321 - .../common/evas_op_blend/op_blend_master_sse3.c | 77 - .../engines/common/evas_op_blend/op_blend_pixel_.c | 162 - .../common/evas_op_blend/op_blend_pixel_color_.c | 284 - .../evas_op_blend/op_blend_pixel_color_i386.c | 221 - .../evas_op_blend/op_blend_pixel_color_neon.c | 570 - .../evas_op_blend/op_blend_pixel_color_sse3.c | 543 - .../common/evas_op_blend/op_blend_pixel_i386.c | 217 - .../common/evas_op_blend/op_blend_pixel_mask_.c | 189 - .../evas_op_blend/op_blend_pixel_mask_i386.c | 157 - .../evas_op_blend/op_blend_pixel_mask_neon.c | 129 - .../evas_op_blend/op_blend_pixel_mask_sse3.c | 300 - .../common/evas_op_blend/op_blend_pixel_neon.c | 530 - .../common/evas_op_blend/op_blend_pixel_sse3.c | 315 - .../src/lib/engines/common/evas_op_blend_main_.c | 671 - .../lib/engines/common/evas_op_copy/Makefile.am | 18 - .../lib/engines/common/evas_op_copy/Makefile.in | 552 - .../engines/common/evas_op_copy/op_copy_color_.c | 138 - .../common/evas_op_copy/op_copy_color_i386.c | 150 - .../common/evas_op_copy/op_copy_color_neon.c | 212 - .../common/evas_op_copy/op_copy_mask_color_.c | 170 - .../common/evas_op_copy/op_copy_mask_color_i386.c | 193 - .../common/evas_op_copy/op_copy_mask_color_neon.c | 170 - .../engines/common/evas_op_copy/op_copy_pixel_.c | 117 - .../common/evas_op_copy/op_copy_pixel_color_.c | 236 - .../common/evas_op_copy/op_copy_pixel_color_i386.c | 255 - .../common/evas_op_copy/op_copy_pixel_color_neon.c | 238 - .../common/evas_op_copy/op_copy_pixel_i386.c | 131 - .../common/evas_op_copy/op_copy_pixel_mask_.c | 150 - .../common/evas_op_copy/op_copy_pixel_mask_i386.c | 176 - .../common/evas_op_copy/op_copy_pixel_mask_neon.c | 151 - .../common/evas_op_copy/op_copy_pixel_neon.c | 158 - .../src/lib/engines/common/evas_op_copy_main_.c | 675 - .../lib/engines/common/evas_op_mask/Makefile.am | 13 - .../lib/engines/common/evas_op_mask/Makefile.in | 547 - .../engines/common/evas_op_mask/op_mask_color_.c | 49 - .../common/evas_op_mask/op_mask_color_i386.c | 58 - .../common/evas_op_mask/op_mask_mask_color_.c | 63 - .../common/evas_op_mask/op_mask_mask_color_i386.c | 13 - .../engines/common/evas_op_mask/op_mask_pixel_.c | 48 - .../common/evas_op_mask/op_mask_pixel_color_.c | 100 - .../common/evas_op_mask/op_mask_pixel_color_i386.c | 13 - .../common/evas_op_mask/op_mask_pixel_i386.c | 58 - .../common/evas_op_mask/op_mask_pixel_mask_.c | 62 - .../common/evas_op_mask/op_mask_pixel_mask_i386.c | 13 - .../src/lib/engines/common/evas_op_mask_main_.c | 309 - .../src/lib/engines/common/evas_op_mul/Makefile.am | 13 - .../src/lib/engines/common/evas_op_mul/Makefile.in | 547 - .../lib/engines/common/evas_op_mul/op_mul_color_.c | 65 - .../engines/common/evas_op_mul/op_mul_color_i386.c | 66 - .../common/evas_op_mul/op_mul_mask_color_.c | 72 - .../common/evas_op_mul/op_mul_mask_color_i386.c | 92 - .../lib/engines/common/evas_op_mul/op_mul_pixel_.c | 56 - .../common/evas_op_mul/op_mul_pixel_color_.c | 122 - .../common/evas_op_mul/op_mul_pixel_color_i386.c | 120 - .../engines/common/evas_op_mul/op_mul_pixel_i386.c | 66 - .../common/evas_op_mul/op_mul_pixel_mask_.c | 117 - .../common/evas_op_mul/op_mul_pixel_mask_i386.c | 63 - .../src/lib/engines/common/evas_op_mul_main_.c | 308 - .../src/lib/engines/common/evas_op_sub/Makefile.am | 14 - .../src/lib/engines/common/evas_op_sub/Makefile.in | 547 - .../lib/engines/common/evas_op_sub/op_sub_color_.c | 33 - .../engines/common/evas_op_sub/op_sub_color_i386.c | 33 - .../common/evas_op_sub/op_sub_mask_color_.c | 33 - .../common/evas_op_sub/op_sub_mask_color_i386.c | 33 - .../lib/engines/common/evas_op_sub/op_sub_pixel_.c | 33 - .../common/evas_op_sub/op_sub_pixel_color_.c | 33 - .../common/evas_op_sub/op_sub_pixel_color_i386.c | 29 - .../engines/common/evas_op_sub/op_sub_pixel_i386.c | 33 - .../common/evas_op_sub/op_sub_pixel_mask_.c | 37 - .../common/evas_op_sub/op_sub_pixel_mask_i386.c | 33 - .../src/lib/engines/common/evas_op_sub_main_.c | 542 - libraries/evas/src/lib/engines/common/evas_pipe.c | 1733 --- libraries/evas/src/lib/engines/common/evas_pipe.h | 111 - .../evas/src/lib/engines/common/evas_polygon.h | 13 - .../src/lib/engines/common/evas_polygon_main.c | 325 - .../evas/src/lib/engines/common/evas_rectangle.h | 11 - .../src/lib/engines/common/evas_rectangle_main.c | 91 - .../evas/src/lib/engines/common/evas_regionbuf.c | 357 - .../evas/src/lib/engines/common/evas_scale_main.c | 6 - .../evas/src/lib/engines/common/evas_scale_main.h | 13 - .../src/lib/engines/common/evas_scale_sample.c | 418 - .../src/lib/engines/common/evas_scale_smooth.c | 532 - .../src/lib/engines/common/evas_scale_smooth.h | 19 - .../lib/engines/common/evas_scale_smooth_scaler.c | 211 - .../engines/common/evas_scale_smooth_scaler_down.c | 43 - .../common/evas_scale_smooth_scaler_downx.c | 259 - .../common/evas_scale_smooth_scaler_downx_downy.c | 387 - .../common/evas_scale_smooth_scaler_downy.c | 260 - .../common/evas_scale_smooth_scaler_noscale.c | 62 - .../engines/common/evas_scale_smooth_scaler_up.c | 266 - .../evas/src/lib/engines/common/evas_scale_span.c | 653 - .../evas/src/lib/engines/common/evas_scale_span.h | 14 - .../evas/src/lib/engines/common/evas_text_utils.c | 472 - .../evas/src/lib/engines/common/evas_text_utils.h | 89 - libraries/evas/src/lib/engines/common/evas_tiler.c | 1439 --- .../lib/engines/common/language/evas_bidi_utils.c | 645 - .../lib/engines/common/language/evas_bidi_utils.h | 157 - .../engines/common/language/evas_language_utils.c | 152 - .../engines/common/language/evas_language_utils.h | 132 - .../engines/common/language/evas_script_table.h | 3087 ----- .../evas/src/lib/engines/common_16/Makefile.am | 32 - .../evas/src/lib/engines/common_16/Makefile.in | 702 -- .../engines/common_16/evas_soft16_dither_mask.c | 293 - .../src/lib/engines/common_16/evas_soft16_font.c | 295 - .../common_16/evas_soft16_image_scaled_sampled.c | 471 - .../engines/common_16/evas_soft16_image_unscaled.c | 287 - .../src/lib/engines/common_16/evas_soft16_line.c | 444 - .../src/lib/engines/common_16/evas_soft16_main.c | 594 - .../engines/common_16/evas_soft16_point_blend.c | 149 - .../lib/engines/common_16/evas_soft16_polygon.c | 231 - .../lib/engines/common_16/evas_soft16_rectangle.c | 121 - .../engines/common_16/evas_soft16_scanline_blend.c | 353 - .../engines/common_16/evas_soft16_scanline_fill.c | 86 - .../evas/src/lib/engines/common_8/Makefile.am | 32 - .../evas/src/lib/engines/common_8/Makefile.in | 700 -- .../lib/engines/common_8/evas_soft8_dither_mask.c | 100 - .../src/lib/engines/common_8/evas_soft8_font.c | 285 - .../common_8/evas_soft8_image_scaled_sampled.c | 463 - .../engines/common_8/evas_soft8_image_unscaled.c | 284 - .../src/lib/engines/common_8/evas_soft8_line.c | 426 - .../src/lib/engines/common_8/evas_soft8_main.c | 656 - .../src/lib/engines/common_8/evas_soft8_polygon.c | 230 - .../lib/engines/common_8/evas_soft8_rectangle.c | 125 - .../engines/common_8/evas_soft8_scanline_blend.c | 447 - .../engines/common_8/evas_soft8_scanline_fill.c | 53 - libraries/evas/src/lib/file/Makefile.am | 22 - libraries/evas/src/lib/file/Makefile.in | 682 - libraries/evas/src/lib/file/evas_module.c | 582 - libraries/evas/src/lib/file/evas_module.h | 94 - libraries/evas/src/lib/file/evas_path.c | 152 - libraries/evas/src/lib/file/evas_path.h | 15 - libraries/evas/src/lib/include/Makefile.am | 13 - libraries/evas/src/lib/include/Makefile.in | 546 - libraries/evas/src/lib/include/evas_blend_ops.h | 378 - libraries/evas/src/lib/include/evas_common.h | 1258 -- .../evas/src/lib/include/evas_common_soft16.h | 100 - libraries/evas/src/lib/include/evas_common_soft8.h | 184 - libraries/evas/src/lib/include/evas_inline.x | 259 - libraries/evas/src/lib/include/evas_macros.h | 217 - libraries/evas/src/lib/include/evas_mmx.h | 735 -- libraries/evas/src/lib/include/evas_options.h | 69 - libraries/evas/src/lib/include/evas_private.h | 1122 -- libraries/evas/src/lib/main.c | 150 - 278 files changed, 118387 deletions(-) delete mode 100644 libraries/evas/src/lib/Evas.h delete mode 100644 libraries/evas/src/lib/Evas_GL.h delete mode 100644 libraries/evas/src/lib/Makefile.am delete mode 100644 libraries/evas/src/lib/Makefile.in delete mode 100644 libraries/evas/src/lib/cache/Makefile.am delete mode 100644 libraries/evas/src/lib/cache/Makefile.in delete mode 100644 libraries/evas/src/lib/cache/evas_cache.h delete mode 100644 libraries/evas/src/lib/cache/evas_cache_engine_image.c delete mode 100644 libraries/evas/src/lib/cache/evas_cache_image.c delete mode 100644 libraries/evas/src/lib/cache/evas_preload.c delete mode 100644 libraries/evas/src/lib/canvas/Makefile.am delete mode 100644 libraries/evas/src/lib/canvas/Makefile.in delete mode 100644 libraries/evas/src/lib/canvas/evas_async_events.c delete mode 100644 libraries/evas/src/lib/canvas/evas_callbacks.c delete mode 100644 libraries/evas/src/lib/canvas/evas_clip.c delete mode 100644 libraries/evas/src/lib/canvas/evas_data.c delete mode 100644 libraries/evas/src/lib/canvas/evas_events.c delete mode 100644 libraries/evas/src/lib/canvas/evas_filter.c delete mode 100644 libraries/evas/src/lib/canvas/evas_focus.c delete mode 100644 libraries/evas/src/lib/canvas/evas_font_dir.c delete mode 100644 libraries/evas/src/lib/canvas/evas_gl.c delete mode 100644 libraries/evas/src/lib/canvas/evas_key.c delete mode 100644 libraries/evas/src/lib/canvas/evas_key_grab.c delete mode 100644 libraries/evas/src/lib/canvas/evas_layer.c delete mode 100644 libraries/evas/src/lib/canvas/evas_main.c delete mode 100644 libraries/evas/src/lib/canvas/evas_map.c delete mode 100644 libraries/evas/src/lib/canvas/evas_name.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_box.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_grid.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_image.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_inform.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_intercept.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_line.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_main.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_polygon.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_rectangle.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_smart.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_smart_clipped.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_table.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_text.c delete mode 100644 libraries/evas/src/lib/canvas/evas_object_textblock.c delete mode 100644 libraries/evas/src/lib/canvas/evas_rectangle.c delete mode 100644 libraries/evas/src/lib/canvas/evas_render.c delete mode 100644 libraries/evas/src/lib/canvas/evas_smart.c delete mode 100644 libraries/evas/src/lib/canvas/evas_stack.c delete mode 100644 libraries/evas/src/lib/canvas/evas_stats.c delete mode 100644 libraries/evas/src/lib/canvas/evas_touch_point.c delete mode 100644 libraries/evas/src/lib/cserve/Makefile.am delete mode 100644 libraries/evas/src/lib/cserve/Makefile.in delete mode 100644 libraries/evas/src/lib/cserve/evas_cs.h delete mode 100644 libraries/evas/src/lib/cserve/evas_cs_client.c delete mode 100644 libraries/evas/src/lib/cserve/evas_cs_main.c delete mode 100644 libraries/evas/src/lib/cserve/evas_cs_mem.c delete mode 100644 libraries/evas/src/lib/cserve/evas_cs_server.c delete mode 100644 libraries/evas/src/lib/engines/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_blend.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_blend_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_blend_private.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_blit_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_color.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_color.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_colorspace.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_colorspace.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_1.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_1.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_4.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_4.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_8.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_gry_8.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_main.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_yuv.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_convert_yuv.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_cpu.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_draw.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_draw_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_font.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_default_walk.x delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_draw.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_load.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_ot.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_ot.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_private.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_font_query.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_image.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_data.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_load.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_private.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_save.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_image_scalecache.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_line.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_line_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_map_image.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_map_image.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_core.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_internal.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_map_image_loop.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_add_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_blend_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_copy_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mask_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_op_sub_main_.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_pipe.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_pipe.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_polygon.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_polygon_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_rectangle.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_rectangle_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_regionbuf.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_main.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_main.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_sample.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_span.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_scale_span.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_text_utils.c delete mode 100644 libraries/evas/src/lib/engines/common/evas_text_utils.h delete mode 100644 libraries/evas/src/lib/engines/common/evas_tiler.c delete mode 100644 libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c delete mode 100644 libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h delete mode 100644 libraries/evas/src/lib/engines/common/language/evas_language_utils.c delete mode 100644 libraries/evas/src/lib/engines/common/language/evas_language_utils.h delete mode 100644 libraries/evas/src/lib/engines/common/language/evas_script_table.h delete mode 100644 libraries/evas/src/lib/engines/common_16/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common_16/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_font.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_line.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_main.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c delete mode 100644 libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c delete mode 100644 libraries/evas/src/lib/engines/common_8/Makefile.am delete mode 100644 libraries/evas/src/lib/engines/common_8/Makefile.in delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_font.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_line.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_main.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c delete mode 100644 libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c delete mode 100644 libraries/evas/src/lib/file/Makefile.am delete mode 100644 libraries/evas/src/lib/file/Makefile.in delete mode 100644 libraries/evas/src/lib/file/evas_module.c delete mode 100644 libraries/evas/src/lib/file/evas_module.h delete mode 100644 libraries/evas/src/lib/file/evas_path.c delete mode 100644 libraries/evas/src/lib/file/evas_path.h delete mode 100644 libraries/evas/src/lib/include/Makefile.am delete mode 100644 libraries/evas/src/lib/include/Makefile.in delete mode 100644 libraries/evas/src/lib/include/evas_blend_ops.h delete mode 100644 libraries/evas/src/lib/include/evas_common.h delete mode 100644 libraries/evas/src/lib/include/evas_common_soft16.h delete mode 100644 libraries/evas/src/lib/include/evas_common_soft8.h delete mode 100644 libraries/evas/src/lib/include/evas_inline.x delete mode 100644 libraries/evas/src/lib/include/evas_macros.h delete mode 100644 libraries/evas/src/lib/include/evas_mmx.h delete mode 100644 libraries/evas/src/lib/include/evas_options.h delete mode 100644 libraries/evas/src/lib/include/evas_private.h delete mode 100644 libraries/evas/src/lib/main.c (limited to 'libraries/evas/src/lib') diff --git a/libraries/evas/src/lib/Evas.h b/libraries/evas/src/lib/Evas.h deleted file mode 100644 index 67d3018..0000000 --- a/libraries/evas/src/lib/Evas.h +++ /dev/null @@ -1,12569 +0,0 @@ -/** -@mainpage Evas - -@version 1.1 -@date 2000-2012 - -Please see the @ref authors page for contact details. -@link Evas.h Evas API @endlink - -@link Evas.h Evas API @endlink - -@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 and much 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 fed 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 canvas' 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 tend 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 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 the 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 -displayed 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 @c 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 @c pkg-config is in your shell's @c -PATH (see the manual page for your appropriate shell) and @c evas.pc -in @c /usr/lib/pkgconfig or its path in the @c 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 it, as -well as use the API calls provided to manage data. - -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, where you'll get how to basically - manipulate generic objects lying on an Evas canvas, handle canvas - and object events, etc. -@li @ref Evas_Object_Rectangle, to learn about the most basic object - type on Evas -- the rectangle. -@li @ref Evas_Object_Polygon, to learn how to create polygon elements - on the canvas. -@li @ref Evas_Line_Group, to learn how to create line elements on the - canvas. -@li @ref Evas_Object_Image, to learn about image objects, over which - Evas can do a plethora of operations. -@li @ref Evas_Object_Text, to learn how to create textual elements on - the canvas. -@li @ref Evas_Object_Textblock, to learn how to create multiline - textual elements on the canvas. -@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group, to define - new objects that provide @b custom functions to handle clipping, - hiding, moving, resizing, color setting and more. These could - be as simple as a group of objects that move together (see @ref - Evas_Smart_Object_Clipped) up to implementations of what - ends to be a widget, providing some intelligence (thus the name) - to Evas objects -- like a button or check box, for example. - -@section intro_example Introductory Example - -@include evas-buffer-simple.c -*/ - -/** -@page authors Authors -@author Carsten Haitzler -@author Till Adam -@author Steve Ireland -@author Brett Nash -@author Tilman Sauerbeck -@author Corey Donohoe -@author Yuri Hudobin -@author Nathan Ingersoll -@author Willem Monsuwe -@author Jose O Gonzalez -@author Bernhard Nemec -@author Jorge Luis Zapata Muga -@author Cedric Bail -@author Gustavo Sverzut Barbieri -@author Vincent Torri -@author Tim Horton -@author Tom Hacohen -@author Mathieu Taillefumier -@author Iván Briano -@author Gustavo Lima Chaves -@author Samsung Electronics -@author Samsung SAIT -@author Sung W. Park -@author Jiyoun Park -@author Myoungwoon Roy Kim(roy_kim) -@author Thierry el Borgi -@author ChunEon Park -@author Christopher 'devilhorns' Michael -@author Seungsoo Woo - -Please contact to get in -contact with the developers and maintainers. -*/ - -#ifndef _EVAS_H -#define _EVAS_H - -#include - -#include - -#ifdef EAPI -# undef EAPI -#endif - -#ifdef _WIN32 -# ifdef EFL_EVAS_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif /* ! DLL_EXPORT */ -# else -# define EAPI __declspec(dllimport) -# endif /* ! EFL_EVAS_BUILD */ -#else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif -#endif /* ! _WIN32 */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define EVAS_VERSION_MAJOR 1 -#define EVAS_VERSION_MINOR 2 - -typedef struct _Evas_Version -{ - int major; - int minor; - int micro; - int revision; -} Evas_Version; - -EAPI extern Evas_Version *evas_version; - -/** - * @file - * @brief These routines are used for Evas library interaction. - * - * @todo check boolean return values and convert to Eina_Bool - * @todo change all api to use EINA_SAFETY_* - * @todo finish api documentation - */ - -/* BiDi exposed stuff */ - /*FIXME: document */ -typedef enum _Evas_BiDi_Direction -{ - EVAS_BIDI_DIRECTION_NATURAL, - EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL, - EVAS_BIDI_DIRECTION_LTR, - EVAS_BIDI_DIRECTION_RTL -} Evas_BiDi_Direction; - -/** - * Identifier of callbacks to be set for Evas canvases or Evas - * objects. - * - * The following figure illustrates some Evas callbacks: - * - * @image html evas-callbacks.png - * @image rtf evas-callbacks.png - * @image latex evas-callbacks.eps - * - * @see evas_object_event_callback_add() - * @see evas_event_callback_add() - */ -typedef enum _Evas_Callback_Type -{ - /* - * The following events are only for use with Evas objects, with - * evas_object_event_callback_add(): - */ - EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */ - EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */ - EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */ - EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */ - EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */ - EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */ - EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */ - EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */ - EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */ - EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */ - EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */ - EVAS_CALLBACK_KEY_UP, /**< Key Release Event */ - EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */ - EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */ - EVAS_CALLBACK_SHOW, /**< Show Event */ - EVAS_CALLBACK_HIDE, /**< Hide Event */ - EVAS_CALLBACK_MOVE, /**< Move Event */ - EVAS_CALLBACK_RESIZE, /**< Resize Event */ - EVAS_CALLBACK_RESTACK, /**< Restack Event */ - EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */ - EVAS_CALLBACK_HOLD, /**< Events go on/off hold */ - EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */ - EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */ - - /* - * The following events are only for use with Evas canvases, with - * evas_event_callback_add(): - */ - EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */ - EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */ - EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */ - EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */ - EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */ - EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */ - - /* - * More Evas object event types - see evas_object_event_callback_add(): - */ - EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */ - - EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */ - EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */ - - EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ -} Evas_Callback_Type; /**< The types of events triggering a callback */ - -/** - * @def EVAS_CALLBACK_PRIORITY_BEFORE - * Slightly more prioritized than default. - * @since 1.1.0 - */ -#define EVAS_CALLBACK_PRIORITY_BEFORE -100 -/** - * @def EVAS_CALLBACK_PRIORITY_DEFAULT - * Default callback priority level - * @since 1.1.0 - */ -#define EVAS_CALLBACK_PRIORITY_DEFAULT 0 -/** - * @def EVAS_CALLBACK_PRIORITY_AFTER - * Slightly less prioritized than default. - * @since 1.1.0 - */ -#define EVAS_CALLBACK_PRIORITY_AFTER 100 - -/** - * @typedef Evas_Callback_Priority - * - * Callback priority value. Range is -32k - 32k. The lower the number, the - * bigger the priority. - * - * @see EVAS_CALLBACK_PRIORITY_AFTER - * @see EVAS_CALLBACK_PRIORITY_BEFORE - * @see EVAS_CALLBACK_PRIORITY_DEFAULT - * - * @since 1.1.0 - */ -typedef short Evas_Callback_Priority; - -/** - * Flags for Mouse Button events - */ -typedef enum _Evas_Button_Flags -{ - EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ - EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */ - EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ -} Evas_Button_Flags; /**< Flags for Mouse Button events */ - -/** - * Flags for Events - */ -typedef enum _Evas_Event_Flags -{ - EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ - EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ - EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ -} Evas_Event_Flags; /**< Flags for Events */ - -/** - * State of Evas_Coord_Touch_Point - */ -typedef enum _Evas_Touch_Point_State -{ - EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */ - EVAS_TOUCH_POINT_UP, /**< Touch point is released */ - EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */ - EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */ - EVAS_TOUCH_POINT_CANCEL /**< Touch point is cancelled */ -} Evas_Touch_Point_State; - -/** - * Flags for Font Hinting - * @ingroup Evas_Font_Group - */ -typedef enum _Evas_Font_Hinting_Flags -{ - EVAS_FONT_HINTING_NONE, /**< No font hinting */ - EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */ - EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ -} Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ - -/** - * Colorspaces for pixel data supported by Evas - * @ingroup Evas_Object_Image - */ -typedef enum _Evas_Colorspace -{ - EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ - /* these are not currently supported - but planned for the future */ - EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed 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 pointed 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_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */ - EVAS_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */ - EVAS_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */ -} Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ - -/** - * How to pack items into cells in a table. - * @ingroup Evas_Object_Table - * - * @see evas_object_table_homogeneous_set() for an explanation of the function of - * each one. - */ -typedef enum _Evas_Object_Table_Homogeneous_Mode -{ - EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, - EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, - EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 -} Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */ - -typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ -typedef struct _Evas_Point Evas_Point; /**< integer point */ - -typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */ -typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */ - -typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ -typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ - -/** - * @typedef Evas_Smart_Class - * - * A smart object's @b base class definition - * - * @ingroup Evas_Smart_Group - */ -typedef struct _Evas_Smart_Class Evas_Smart_Class; - -/** - * @typedef Evas_Smart_Cb_Description - * - * A smart object callback description, used to provide introspection - * - * @ingroup Evas_Smart_Group - */ -typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; - -/** - * @typedef Evas_Map - * - * An opaque handle to map points - * - * @see evas_map_new() - * @see evas_map_free() - * @see evas_map_dup() - * - * @ingroup Evas_Object_Group_Map - */ -typedef struct _Evas_Map Evas_Map; - -/** - * @typedef Evas - * - * An opaque handle to an Evas canvas. - * - * @see evas_new() - * @see evas_free() - * - * @ingroup Evas_Canvas - */ -typedef struct _Evas Evas; - -/** - * @typedef Evas_Object - * An Evas Object handle. - * @ingroup Evas_Object_Group - */ -typedef struct _Evas_Object Evas_Object; - -typedef void Evas_Performance; /**< An Evas Performance handle */ -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 Evas_Video_Surface - * - * A generic datatype for video specific surface information - * @see evas_object_image_video_surface_set - * @see evas_object_image_video_surface_get - * @since 1.1.0 - */ -typedef struct _Evas_Video_Surface Evas_Video_Surface; - -typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */ - -typedef int Evas_Coord; -typedef int Evas_Font_Size; -typedef int Evas_Angle; - -struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */ -{ - Evas_Coord x; /**< top-left x co-ordinate of rectangle */ - Evas_Coord y; /**< top-left y co-ordinate of rectangle */ - Evas_Coord w; /**< width of rectangle */ - Evas_Coord h; /**< height of rectangle */ -}; - -struct _Evas_Point -{ - int x, y; -}; - -struct _Evas_Coord_Point -{ - Evas_Coord x, y; -}; - -struct _Evas_Coord_Precision_Point -{ - Evas_Coord x, y; - double xsub, ysub; -}; - -struct _Evas_Position -{ - Evas_Point output; - Evas_Coord_Point canvas; -}; - -struct _Evas_Precision_Position -{ - Evas_Point output; - Evas_Coord_Precision_Point canvas; -}; - -typedef enum _Evas_Aspect_Control -{ - EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */ - EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */ - EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */ - EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */ - EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ -} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ - -typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ -typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ -typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */ -typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */ -typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */ -typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */ -typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */ -typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */ -typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */ -typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */ -typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */ -typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */ -typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */ -typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */ -typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */ - -typedef enum _Evas_Load_Error -{ - EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */ - EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */ - EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */ - EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission denied to an existing file (or path) */ - 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; /**< Evas image load error codes one can get - see evas_load_error_str() too. */ - - -typedef enum _Evas_Alloc_Error -{ - EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation 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 */ - EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */ - EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */ - EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */ - EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */ - EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */ -} Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */ - -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 with 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 -{ - Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */ - int w, h; /**< width and height of source in pixels */ - void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */ -}; - -/* 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; - Evas_Native_Surface_Type type; - union { - struct { - void *visual; /**< visual of the pixmap to use (Visual) */ - unsigned long pixmap; /**< pixmap id to use (Pixmap) */ - } x11; - struct { - unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */ - unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */ - unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */ - unsigned int format; /**< same as 'format' for glTexImage2D() */ - unsigned int x, y, w, h; /**< region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive) */ - } opengl; - } data; -}; - -/** - * @def EVAS_VIDEO_SURFACE_VERSION - * Magic version number to know what the video surf struct looks like - * @since 1.1.0 - */ -#define EVAS_VIDEO_SURFACE_VERSION 1 - -typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface); -typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b); - -struct _Evas_Video_Surface -{ - int version; - - Evas_Video_Coord_Cb move; /**< Move the video surface to this position */ - Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */ - Evas_Video_Cb show; /**< Show the video overlay surface */ - Evas_Video_Cb hide; /**< Hide the video overlay surface */ - Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */ - - Evas_Object *parent; - void *data; -}; - -#define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */ -#define EVAS_LAYER_MAX 32767 /**< top-most layer number */ - -#define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */ -#define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */ -#define EVAS_TEXT_INVALID -1 /**< Not used for anything */ -#define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */ - -#define EVAS_HINT_EXPAND 1.0 /**< Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */ -#define EVAS_HINT_FILL -1.0 /**< Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */ -#define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ -#define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ -#define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ -#define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ - -/** - * How the object should be rendered to output. - * @ingroup Evas_Object_Group_Extras - */ -typedef enum _Evas_Render_Op -{ - EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ - EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */ - EVAS_RENDER_COPY = 2, /**< d = s */ - EVAS_RENDER_COPY_REL = 3, /**< d = s*da */ - EVAS_RENDER_ADD = 4, /* d = d + s */ - EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */ - EVAS_RENDER_SUB = 6, /**< d = d - s */ - EVAS_RENDER_SUB_REL = 7, /* d = d - s*da */ - EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */ - EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ - EVAS_RENDER_MASK = 10, /**< d = d*sa */ - EVAS_RENDER_MUL = 11 /**< d = d*s */ -} Evas_Render_Op; /**< How the object should be rendered to output. */ - -typedef enum _Evas_Border_Fill_Mode -{ - EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */ - EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */ - EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */ -} Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */ - -typedef enum _Evas_Image_Scale_Hint -{ - EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */ - EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */ - EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */ -} Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */ - -typedef enum _Evas_Image_Animated_Loop_Hint -{ - EVAS_IMAGE_ANIMATED_HINT_NONE = 0, - EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */ - EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */ -} Evas_Image_Animated_Loop_Hint; - -typedef enum _Evas_Engine_Render_Mode -{ - EVAS_RENDER_MODE_BLOCKING = 0, - EVAS_RENDER_MODE_NONBLOCKING = 1, -} Evas_Engine_Render_Mode; - -typedef enum _Evas_Image_Content_Hint -{ - EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */ - EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */ - EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */ -} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */ - -struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */ -{ - int magic; /**< Magic number */ -}; - -struct _Evas_Event_Mouse_Down /** Mouse button press event */ -{ - int button; /**< Mouse button number that went down (1 - 32) */ - - Evas_Point output; /**< The X/Y location of the cursor */ - Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ - - void *data; - Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ - Evas_Lock *locks; - - Evas_Button_Flags flags; /**< button flags set during the event */ - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Mouse_Up /** Mouse button release event */ -{ - int button; /**< Mouse button number that was raised (1 - 32) */ - - Evas_Point output; - Evas_Coord_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - - Evas_Button_Flags flags; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Mouse_In /** Mouse enter event */ -{ - int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ - - Evas_Point output; - Evas_Coord_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Mouse_Out /** Mouse leave event */ -{ - int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ - - - Evas_Point output; - Evas_Coord_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Mouse_Move /** Mouse button down event */ -{ - int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ - - Evas_Position cur, prev; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Mouse_Wheel /** Wheel event */ -{ - int direction; /* 0 = default up/down wheel FIXME: more wheel types */ - int z; /* ...,-2,-1 = down, 1,2,... = up */ - - Evas_Point output; - Evas_Coord_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Multi_Down /** Multi button press event */ -{ - int device; /**< Multi device number that went down (1 or more for extra touches) */ - double radius, radius_x, radius_y; - double pressure, angle; - - Evas_Point output; - Evas_Coord_Precision_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - - Evas_Button_Flags flags; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Multi_Up /** Multi button release event */ -{ - int device; /**< Multi device number that went up (1 or more for extra touches) */ - double radius, radius_x, radius_y; - double pressure, angle; - - Evas_Point output; - Evas_Coord_Precision_Point canvas; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - - Evas_Button_Flags flags; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Multi_Move /** Multi button down event */ -{ - int device; /**< Multi device number that moved (1 or more for extra touches) */ - double radius, radius_x, radius_y; - double pressure, angle; - - Evas_Precision_Position cur; - - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Key_Down /** Key press event */ -{ - char *keyname; /**< the name string of the key pressed */ - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - - const char *key; /**< The logical key : (eg shift+1 == exclamation) */ - const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ - const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Key_Up /** Key release event */ -{ - char *keyname; /**< the name string of the key released */ - void *data; - Evas_Modifier *modifiers; - Evas_Lock *locks; - - const char *key; /**< The logical key : (eg shift+1 == exclamation) */ - const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ - const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -struct _Evas_Event_Hold /** Hold change event */ -{ - int hold; /**< The hold flag */ - void *data; - - unsigned int timestamp; - Evas_Event_Flags event_flags; - Evas_Device *dev; -}; - -/** - * How the mouse pointer should be handled by Evas. - * - * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button - * is pressed down over an object and held, with the mouse pointer - * being moved outside of it, the pointer still behaves as being bound - * to that object, albeit out of its drawing region. When the button - * is released, the event will be fed to the object, that may check if - * the final position is over it or not and do something about it. - * - * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will - * always be bound to the object right below it. - * - * @ingroup Evas_Object_Group_Extras - */ -typedef enum _Evas_Object_Pointer_Mode -{ - EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ - EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ - EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ -} Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ - -typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ -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); /**< Evas object event callback function signature */ -typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info); - -/** - * @defgroup Evas_Group Top Level Functions - * - * Functions that affect Evas as a whole. - */ - -/** - * Initialize Evas - * - * @return The init counter value. - * - * This function initializes Evas and increments a counter of the - * number of calls to it. It returns 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); - -/** - * 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(). - * - * 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); - - -/** - * 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 callback. 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); - - -/** - * @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) EINA_WARN_UNUSED_RESULT; - -/** - * @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); - -/** -* 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) EINA_ARG_NONNULL(1, 4); - -/** - * @defgroup Evas_Canvas Canvas Functions - * - * Low level Evas canvas functions. Sub groups will present more high - * level ones, though. - * - * 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. They are the - * functions you need to use at a minimum to get a working canvas. - * - * Some of the functions in this group are exemplified @ref - * Example_Evas_Events "here". - */ - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_MALLOC; - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * 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); - -/** - * 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); - -/** - * 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); - -/** - * 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); - -/** - * 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); - - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * 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 must not 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 probably - * 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 unnecessary 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 function, 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 to be repainted again, call the - * function evas_obscured_clear(). - * - * @note This is a very low level function, which most of - * Evas' users wouldn't care about. - * - * @note This function does @b not 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); - -/** - * Remove all "obscured regions" from an Evas canvas. - * - * @param e The given canvas pointer. - * - * 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 to be repainted on rendering updates. - * - * @note This is a very low level function, which most of - * Evas' users wouldn't care about. - * - * @note This function does @b not 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_rectangle_add() for an example - * @see evas_render_updates() - * - * @ingroup Evas_Canvas - */ -EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1); - -/** - * Force immediate renderization of the given Evas canvas. - * - * @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(). - * - * This function forces an immediate renderization update of the given - * canvas @e. - * - * @note This is a very low level function, 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 Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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. - * - * @see evas_render_updates() for an example - * - * @ingroup Evas_Canvas - */ -EAPI void evas_render_updates_free (Eina_List *updates); - -/** - * Force renderization of the given canvas. - * - * @param e The given canvas pointer. - * - * @ingroup Evas_Canvas - */ -EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(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) EINA_ARG_NONNULL(1); - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * 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 - */ -EAPI void evas_render_dump (Evas *e) EINA_ARG_NONNULL(1); - -/** - * @defgroup Evas_Output_Method Render Engine Functions - * - * Functions that are used to set the render engine for a given - * function, and then get that engine working. - * - * 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_init(); - * - * 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 - * - * @ingroup Evas_Canvas - */ - -/** - * Look up a numeric ID from a string name of a rendering engine. - * - * @param name the name string 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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 name string 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("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 - * - * @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("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. - * - * 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 . - * - * @param e The given evas. - * @param render_method The numeric engine value to use. - * - * @attention it is mandatory that one calls evas_init() before - * setting the output method. - * - * @ingroup Evas_Output_Method - */ -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); - - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * @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 - */ - -/** - * 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); - -/** - * 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); - -/** - * 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); - -/** - * 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); - -/** - * Sets the output framespace size of the render engine of the given evas. - * - * The framespace size is used in the Wayland engines to denote space where - * the output is not drawn. This is mainly used in ecore_evas to draw borders - * - * The units used for @p w and @p h depend on the engine used by the - * evas. - * - * @param e The given evas. - * @param x The left coordinate in output units, usually pixels. - * @param y The top coordinate in output units, usually pixels. - * @param w The width in output units, usually pixels. - * @param h The height in output units, usually pixels. - * @ingroup Evas_Output_Size - * @since 1.1.0 - */ -EAPI void evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); - -/** - * Get the render engine's output framespace co-ordinates in canvas units. - * - * @param e The pointer to the Evas Canvas - * @param x The pointer to a x variable to be filled in - * @param y The pointer to a y variable to be filled in - * @param w The pointer to a width variable to be filled in - * @param h The pointer to a height variable to be filled in - * @ingroup Evas_Output_Size - * @since 1.1.0 - */ -EAPI void evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); - -/** - * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions - * - * Functions that are used to map coordinates from the canvas to the - * screen or the screen to the canvas. - * - * @ingroup Evas_Canvas - */ - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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 canvas - * @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, which are mainly reports on - * its internal states changing (an object got focused, the rendering - * is updated, etc). - * - * Some of the functions in this group are exemplified @ref - * Example_Evas_Events "here". - * - * @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); - -/** - * Add (register) a callback function to a given canvas event with a - * non-default priority set. Except for the priority field, it's exactly the - * same as @ref evas_event_callback_add - * - * @param e Canvas to attach a callback to - * @param type The type of event that will trigger the callback - * @param priority The priority of the callback, lower values called first. - * @param func The (callback) function to be called when the event is - * triggered - * @param data The data pointer to be passed to @p func - * - * @see evas_event_callback_add - * @since 1.1.0 - */ -EAPI void evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); - -/** - * 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 the first 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 all 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 have 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 wishes 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. - * - * Most of the time use of freezing events is done like this: - * @code - * evas_event_freeze(my_evas_canvas); - * function_that_does_work_which_cant_be_interrupted_by_events(); - * evas_event_thaw(my_evas_canvas); - * @endcode - * - * Some of the functions in this group are exemplified @ref - * Example_Evas_Events "here". - * - * @ingroup Evas_Canvas_Events - */ - -/** - * @addtogroup Evas_Event_Freezing_Group - * @{ - */ - -/** - * Set the default set of flags an event begins with - * - * @param e The canvas to set the default event flags of - * @param flags The default flags to use - * - * Events in evas can have an event_flags member. This starts out with - * and initial value (no flags). this lets you set the default flags that - * an event begins with to be @p flags - * - * @since 1.2 - */ -EAPI void evas_event_default_flags_set (Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1); - -/** - * Get the defaulty set of flags an event begins with - * - * @param e The canvas to get the default event flags from - * @return The default event flags for that canvas - * - * This gets the default event flags events are produced with when fed in. - * - * @see evas_event_default_flags_set() - * @since 1.2 - */ -EAPI Evas_Event_Flags evas_event_default_flags_get (const Evas *e) EINA_ARG_NONNULL(1); - -/** - * Freeze all input events processing. - * - * @param e The canvas to freeze input events processing on. - * - * 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. 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 interact 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 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); - -/** - * 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. - * - * @warning Most of the time these functions are @b not what you're looking for. - * These functions should only be used if you're not working with ecore evas(or - * another input handling system). If you're not using ecore evas please - * consider using it, in most situation it will make life a lot easier. - * - * 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. - * - * Some of the functions in this group are exemplified @ref - * Example_Evas_Events "here". - * - * @ingroup Evas_Canvas_Events - */ - -/** - * @addtogroup Evas_Event_Feeding_Group - * @{ - */ - -/** - * Get the number of mouse or multi presses currently active - * - * @p e The given canvas pointer. - * @return The numer of presses (0 if none active). - * - * @since 1.2 - */ -EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1); - -/** - * Mouse down event feed. - * - * @param e The given canvas pointer. - * @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); - -/** - * Re feed event. - * - * @param e The given canvas pointer. - * @param event_copy the event to refeed - * @param event_type Event type - * - * This function re-feeds the event pointed by event_copy - * - * This function call evas_event_feed_* functions, so it can - * cause havoc if not used wisely. Please use it responsibly. - */ -EAPI void evas_event_refeed_event (Evas *e, void *event_copy, Evas_Callback_Type event_type) EINA_ARG_NONNULL(1); - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @defgroup Evas_Image_Group Image Functions - * - * Functions that deals with images at canvas level. - * - * @ingroup Evas_Canvas - */ - -/** - * @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) 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 in bytes. - * - */ -EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); - -/** - * Get the image cache - * - * @param e The given evas pointer. - * - * This function returns the image cache size of canvas in bytes. - * - */ -EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the maximum image size evas can possibly handle - * - * @param e The given evas pointer. - * @param maxw Pointer to hold the return value in pixels of the maxumum width - * @param maxh Pointer to hold the return value in pixels of the maximum height - * - * This function returns the larges image or surface size that evas can handle - * in pixels, and if there is one, returns EINA_TRUE. It returns EINA_FALSE - * if no extra constraint on maximum image size exists. You still should - * check the return values of @p maxw and @p maxh as there may still be a - * limit, just a much higher one. - * - * @since 1.1 - */ -EAPI Eina_Bool evas_image_max_size_get (const Evas *e, int *maxw, int *maxh) EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @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); - -/** - * 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); - - -/** - * 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); - - -/** - * 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); - -/** - * 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); - -/** - * @defgroup Evas_Object_Group Generic Object Functions - * - * Functions that manipulate generic Evas objects. - * - * All Evas displaying units are Evas objects. One handles them all by - * means of the handle ::Evas_Object. Besides Evas treats their - * objects equally, they have @b types, which define their specific - * behavior (and individual API). - * - * Evas comes with a set of built-in object types: - * - rectangle, - * - line, - * - polygon, - * - text, - * - textblock and - * - image. - * - * These functions apply to @b any Evas object, whichever type that - * may have. - * - * @note The built-in types which are most used are rectangles, text - * and images. In fact, with these ones one can create 2D interfaces - * of arbitrary complexity and EFL makes it easy. - */ - -/** - * @defgroup Evas_Object_Group_Basic Basic Object Manipulation - * - * Almost every evas object created will have some generic function used to - * manipulate it. That's because there are a number of basic actions to be done - * to objects that are irrespective of the object's type, things like: - * @li Showing/Hiding - * @li Setting(and getting) geometry - * @li Bring up or down a layer - * @li Color management - * @li Handling focus - * @li Clipping - * @li Reference counting - * - * All of this issues are handled through the functions here grouped. Examples - * of these function can be seen in @ref Example_Evas_Object_Manipulation(which - * deals with the most common ones) and in @ref Example_Evas_Stacking(which - * deals with stacking functions). - * - * @ingroup Evas_Object_Group - */ - -/** - * @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 clip. 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 one, so the resulting color for the former - * will be RESULT = (OBJ * CLIP) / (255 * 255), per color - * element (red, green, blue and alpha). - * - * Clipping is recursive, so clipping objects may be clipped by - * others, and their color will in term be multiplied. You may @b 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 in the canvas as - * normal; those that clip one 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 (as in - * evas_object_show()), the objects clipped by it will not be shown - * either. - * - * If @p obj was being clipped by another object when this function is - * called, it gets implicitly removed from the old clipper's domain - * and is made now to be clipped by its new clipper. - * - * The following figure illustrates some clipping in Evas: - * - * @image html clipping.png - * @image rtf clipping.png - * @image latex clipping.eps - * - * @note 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 can also be @c - * NULL, in which case the effect of this function is the same as - * calling evas_object_clip_unset() on the @p obj object. - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip solid white clipper (note that it's the default color for a - * @until evas_object_show(d.clipper); - * - * See the full @ref Example_Evas_Object_Manipulation "example". - */ -EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); - -/** - * Get the object clipping @p obj (if any). - * - * @param obj The object to get the clipper from - * - * This function returns the object clipping @p obj. If @p obj is - * not being clipped at all, @c NULL is returned. The object @p obj - * must be a valid ::Evas_Object. - * - * See also evas_object_clip_set(), evas_object_clip_unset() and - * evas_object_clipees_get(). - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip if (evas_object_clip_get(d.img) == d.clipper) - * @until return - * - * See the full @ref Example_Evas_Object_Manipulation "example". - */ -EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Disable/cease clipping on a clipped @p obj object. - * - * @param obj The object to cease clipping on - * - * This function disables clipping for the object @p obj, if it was - * already clipped, i.e., its visibility and color get detached from - * the previous clipper. If it wasn't, this has no effect. The object - * @p obj must be a valid ::Evas_Object. - * - * See also evas_object_clip_set() (for an example), - * evas_object_clipees_get() and evas_object_clip_get(). - * - */ -EAPI void evas_object_clip_unset (Evas_Object *obj); - -/** - * Return a list of objects currently clipped by @p obj. - * - * @param obj The object to get a list of clippees from - * @return a list of objects being clipped by @p obj - * - * This returns the internal list handle that contains all objects - * clipped by the object @p obj. If none are clipped by it, the call - * returns @c 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, deleted or get the - * clipper 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, possibly - * leading to crashes. The object @p obj must be a valid - * ::Evas_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); - - -/** - * Sets or unsets a given object as the currently focused one on its - * canvas. - * - * @param obj The object to be focused or unfocused. - * @param focus @c EINA_TRUE, to set it as focused or @c EINA_FALSE, - * to take away the focus from it. - * - * Changing focus only affects where (key) input events go. There can - * be only one object focused at any time. If @p focus is @c - * EINA_TRUE, @p obj will be set as the currently focused object and - * it will receive all keyboard events that are not exclusive key - * grabs on other objects. - * - * Example: - * @dontinclude evas-events.c - * @skip evas_object_focus_set - * @until evas_object_focus_set - * - * See the full example @ref Example_Evas_Events "here". - * - * @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); - -/** - * Retrieve whether an object has the focus. - * - * @param obj The object to retrieve focus information from. - * @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE - * otherwise. - * - * If the passed object is the currently focused one, @c EINA_TRUE is - * returned. @c EINA_FALSE is returned, otherwise. - * - * Example: - * @dontinclude evas-events.c - * @skip And again - * @until something is bad - * - * See the full example @ref Example_Evas_Events "here". - * - * @see evas_object_focus_set - * @see evas_focus_get - * @see evas_object_key_grab - * @see evas_object_key_ungrab - */ -EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * Sets the layer of the its canvas that the given object will be part - * of. - * - * @param obj The given Evas object. - * @param l The number of the layer to place the object on. - * Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. - * - * If you don't use this function, you'll be dealing with an @b unique - * layer of objects, the default one. Additional layers are handy when - * you don't want a set of objects to interfere with another set with - * regard to @b stacking. Two layers are completely disjoint in that - * matter. - * - * This is a low-level function, which you'd be using when something - * should be always on top, for example. - * - * @warning Be careful, it doesn't make sense to change the layer of - * smart objects' children. Smart objects have a layer of their own, - * which should contain all their children objects. - * - * @see evas_object_layer_get() - */ -EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1); - -/** - * Retrieves the layer of its canvas that the given object is part of. - * - * @param obj The given Evas object to query layer from - * @return Number of the its layer - * - * @see evas_object_layer_set() - */ -EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * Sets the name of the given Evas object to the given name. - * - * @param obj The given object. - * @param name The given name. - * - * There might be occasions where one would like to name his/her - * objects. - * - * Example: - * @dontinclude evas-events.c - * @skip d.bg = evas_object_rectangle_add(d.canvas); - * @until evas_object_name_set(d.bg, "our dear rectangle"); - * - * See the full @ref Example_Evas_Events "example". - */ -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 or @c NULL, if no name has been given - * to it. - * - * Example: - * @dontinclude evas-events.c - * @skip fprintf(stdout, "An object got focused: %s\n", - * @until evas_focus_get - * - * See the full @ref Example_Evas_Events "example". - */ -EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * Increments object reference count to defer its deletion. - * - * @param obj The given Evas object to reference - * - * 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 (counter back to 0). References cannot - * go below 0 and unreferencing past that 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. - * - * @see evas_object_unref() - * @see evas_object_del() - * - * @note This is a very simple reference counting mechanism! For - * instance, Evas is not ready to check for pending references on a - * canvas deletion, or things like that. This is useful on scenarios - * where, inside a code block, callbacks exist which would possibly - * delete an object we are operating on afterwards. Then, one would - * evas_object_ref() it on the beginning of the block and - * evas_object_unref() it on the end. It would then be deleted at this - * point, if it should be. - * - * Example: - * @code - * evas_object_ref(obj); - * - * // action here... - * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL); - * // more action here... - * evas_object_unref(obj); - * @endcode - * - * @ingroup Evas_Object_Group_Basic - * @since 1.1.0 - */ -EAPI void evas_object_ref (Evas_Object *obj); - -/** - * Decrements object reference count. - * - * @param obj The given Evas object to unreference - * - * 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 and puts - * the counter back to 0. See evas_object_ref() for more information. - * - * @see evas_object_ref() (for an example) - * @see evas_object_del() - * - * @ingroup Evas_Object_Group_Basic - * @since 1.1.0 - */ -EAPI void evas_object_unref (Evas_Object *obj); - - -/** - * Marks the given Evas object for deletion (when Evas will free its - * memory). - * - * @param obj The given Evas object. - * - * This call will mark @p obj for deletion, which will take place - * whenever it has no more references to it (see evas_object_ref() and - * evas_object_unref()). - * - * At actual deletion time, which may or may not be just after this - * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will - * be called. If the object currently had the focus, its - * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called. - * - * @see evas_object_ref() - * @see evas_object_unref() - * - * @ingroup Evas_Object_Group_Basic - */ -EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Move the given Evas object to the given location inside its - * canvas' viewport. - * - * @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. - * - * Besides being moved, the object's ::EVAS_CALLBACK_MOVE callback - * will be called. - * - * @note Naturally, newly created objects are placed at the canvas' - * origin: 0, 0. - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3); - * @until evas_object_show - * - * See the full @ref Example_Evas_Object_Manipulation "example". - * - * @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. - * - * Besides being resized, the object's ::EVAS_CALLBACK_RESIZE callback - * will be called. - * - * @note Newly created objects have zeroed dimensions. Then, you most - * probably want to use evas_object_resize() on them after they are - * created. - * - * @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. - * - * @note 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. 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 - * - * @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. - * - * @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. - * - * The position, naturally, will be relative to the top left corner of - * the canvas' viewport. - * - * @note Use @c NULL pointers on the geometry components you're not - * interested in: they'll be ignored by the function. - * - * Example: - * @dontinclude evas-events.c - * @skip int w, h, cw, ch; - * @until return - * - * See the full @ref Example_Evas_Events "example". - * - * @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. - * - * Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW - * callback will be called. - * - * @see evas_object_hide() for more on object visibility. - * @see evas_object_visible_get() - * - * @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. - * - * Hidden objects, besides not being shown at all in your canvas, - * won't be checked for changes on the canvas rendering - * process. Furthermore, they will not catch input events. Thus, they - * are much ligher (in processing needs) than an object that is - * invisible due to indirect causes, such as being clipped or out of - * the canvas' viewport. - * - * Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW - * callback will be called. - * - * @note All objects are created in the hidden state! If you want them - * shown, use evas_object_show() after their creation. - * - * @see evas_object_show() - * @see evas_object_visible_get() - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip if (evas_object_visible_get(d.clipper)) - * @until return - * - * See the full @ref Example_Evas_Object_Manipulation "example". - * - * @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 EINA_TRUE if the object is visible, @c EINA_FALSE - * otherwise. - * - * This retrieves an object's visibility as the one enforced by - * evas_object_show() and evas_object_hide(). - * - * @note The value returned isn't, by any means, influenced by - * clippers covering @obj, it being out of its canvas' viewport or - * stacked below other object. - * - * @see evas_object_show() - * @see evas_object_hide() (for an example) - * - * @ingroup Evas_Object_Group_Basic - */ -EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * Sets the general/main color of the given Evas object to the given - * one. - * - * @param obj The given Evas object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * @see evas_object_color_get() (for an example) - * @note These color values are expected to be premultiplied by @p a. - * - * @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/main color of the given Evas object. - * - * @param obj The given Evas object to retrieve color from. - * @param r Pointer to an integer in which to store the red component - * of the color. - * @param g Pointer to an integer in which to store the green - * component of the color. - * @param b Pointer to an integer in which to store the blue component - * of the color. - * @param a Pointer to an integer in which to store the alpha - * component of the color. - * - * Retrieves the “main” color's RGB component (and alpha channel) - * values, which range from 0 to 255. For the alpha channel, - * which defines the object's transparency level, 0 means totally - * transparent, while 255 means opaque. These color values are - * premultiplied by the alpha value. - * - * Usually you’ll use this attribute for text and rectangle objects, - * where the “main” color is their unique one. If set for objects - * which themselves have colors, like the images one, those colors get - * modulated by this one. - * - * @note All newly created Evas rectangles get the default color - * values of 255 255 255 255 (opaque white). - * - * @note Use @c NULL pointers on the components you're not interested - * in: they'll be ignored by the function. - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip int alpha, r, g, b; - * @until return - * - * See the full @ref Example_Evas_Object_Manipulation "example". - * - * @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 canvas that the given object lives on. - * - * @param obj The given Evas object. - * @return A pointer to the canvas where the object is on. - * - * This function is most useful at code contexts where you need to - * operate on the canvas but have only the object pointer. - * - * @ingroup Evas_Object_Group_Basic - */ -EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieves the type of the given Evas object. - * - * @param obj The given object. - * @return The type of the object. - * - * For Evas' builtin types, the return strings will be one of: - * - "rectangle", - * - "line", - * - "polygon", - * - "text", - * - "textblock" and - * - "image". - * - * For Evas smart objects (see @ref Evas_Smart_Group), the name of the - * smart class itself is returned on this call. For the built-in smart - * objects, these names are: - * - "EvasObjectSmartClipped", for the clipped smart object - * - "Evas_Object_Box", for the box object and - * - "Evas_Object_Table", for the table object. - * - * Example: - * @dontinclude evas-object-manipulation.c - * @skip d.img = evas_object_image_filled_add(d.canvas); - * @until border on the - * - * See the full @ref Example_Evas_Object_Manipulation "example". - */ -EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Raise @p obj to the top of its layer. - * - * @param obj the object to raise - * - * @p obj will, then, be the highest one in the layer it belongs - * to. Object on other layers won't get touched. - * - * @see evas_object_stack_above() - * @see evas_object_stack_below() - * @see evas_object_lower() - */ -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 - * - * @p obj will, then, be the lowest one in the layer it belongs - * to. Objects on other layers won't get touched. - * - * @see evas_object_stack_above() - * @see evas_object_stack_below() - * @see evas_object_raise() - */ -EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Stack @p obj immediately above @p above - * - * @param obj the object to stack - * @param above the object above which to stack - * - * Objects, in a given canvas, are stacked in the order they get added - * to it. This means that, if they overlap, the highest ones will - * cover the lowest ones, in that order. This function is a way to - * change the stacking order for the objects. - * - * This function is intended to be used with objects belonging to - * the same layer in a given canvas, otherwise it will fail (and - * accomplish nothing). - * - * If you have smart objects on your canvas and @p obj is a member of - * one of them, then @p above must also be a member of the same - * smart object. - * - * Similarly, if @p obj is not a member of a smart object, @p above - * must not be either. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_stack_below() - */ -EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); - -/** - * Stack @p obj immediately below @p below - * - * @param obj the object to stack - * @param below the object below which to stack - * - * Objects, in a given canvas, are stacked in the order they get added - * to it. This means that, if they overlap, the highest ones will - * cover the lowest ones, in that order. This function is a way to - * change the stacking order for the objects. - * - * This function is intended to be used with objects belonging to - * the same layer in a given canvas, otherwise it will fail (and - * accomplish nothing). - * - * If you have smart objects on your canvas and @p obj is a member of - * one of them, then @p below must also be a member of the same - * smart object. - * - * Similarly, if @p obj is not a member of a smart object, @p below - * must not be either. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_stack_below() - */ -EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); - -/** - * Get the Evas object stacked right above @p obj - * - * @param obj an #Evas_Object - * @return the #Evas_Object directly above @p obj, if any, or @c NULL, - * if none - * - * This function will traverse layers in its search, if there are - * objects on layers above the one @p obj is placed at. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_below_get() - * - */ -EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the Evas object stacked right below @p obj - * - * @param obj an #Evas_Object - * @return the #Evas_Object directly below @p obj, if any, or @c NULL, - * if none - * - * This function will traverse layers in its search, if there are - * objects on layers below the one @p obj is placed at. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_below_get() - */ -EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @defgroup Evas_Object_Group_Events Object Events - * - * Objects generate events when they are moved, resized, when their - * visibility change, when they are deleted and so on. These methods - * allow one to be notified about and to handle such events. - * - * Objects also generate events on input (keyboard and mouse), if they - * accept them (are visible, focused, etc). - * - * For each of those events, Evas provides a way for one to register - * callback functions to be issued just after they happen. - * - * The following figure illustrates some Evas (event) callbacks: - * - * @image html evas-callbacks.png - * @image rtf evas-callbacks.png - * @image latex evas-callbacks.eps - * - * Thees events have their values in the #Evas_Callback_Type - * enumeration, which has also ones happening on the canvas level (se - * #Evas_Canvas_Events). - * - * Examples on this group of functions can be found @ref - * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". - * - * @ingroup Evas_Object_Group - */ - -/** - * @addtogroup Evas_Object_Group_Events - * @{ - */ - -/** - * Add (register) a callback function to a given Evas object event. - * - * @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. - * - * A callback function must have the ::Evas_Object_Event_Cb prototype - * definition. The first parameter (@p data) in this definition will - * have the same value passed to evas_object_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 is - * a pointer to the object on which event occurred. Finally, the - * fourth 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_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT, - * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP, - * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL, - * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP, - * #EVAS_CALLBACK_MULTI_MOVE, #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, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL, - * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS, - * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED. - * - * This determines the kind of event that will trigger the callback. - * What follows is a list explaining better the nature of each type of - * event, along with their associated @p event_info pointers: - * - * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an - * #Evas_Event_Mouse_In struct\n\n - * This event is triggered when the mouse pointer enters the area - * (not shaded by other objects) of the object @p obj. This may - * occur by the mouse pointer being moved by - * evas_event_feed_mouse_move() calls, or by the object being shown, - * raised, moved, resized, or other objects being moved out of the - * way, hidden or lowered, whatever may cause the mouse pointer to - * get on top of @p obj, having been on top of another object - * previously. - * - * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an - * #Evas_Event_Mouse_Out struct\n\n - * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, - * but it occurs when the mouse pointer exits an object's area. Note - * that no mouse out events will be reported if the mouse pointer is - * implicitly grabbed to an object (mouse buttons are down, having - * been pressed while the pointer was over that object). In these - * cases, mouse out events will be reported once all buttons are - * released, if the mouse pointer has left the object's area. The - * indirect ways of taking off the mouse pointer from an object, - * like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here, - * naturally. - * - * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an - * #Evas_Event_Mouse_Down struct\n\n - * This event is triggered by a mouse button being pressed while the - * mouse pointer is over an object. If the pointer mode for Evas is - * #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this - * object to passively grab the mouse until all mouse buttons - * have been released: all future mouse events will be reported to - * only this object until no buttons are down. That includes mouse - * move events, mouse in and mouse out events, and further button - * presses. When all buttons are released, event propagation will - * occur as normal (see #Evas_Object_Pointer_Mode). - * - * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an - * #Evas_Event_Mouse_Up struct\n\n - * This event is triggered by a mouse button being released while - * the mouse pointer is over an object's area (or when passively - * grabbed to an object). - * - * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an - * #Evas_Event_Mouse_Move struct\n\n - * This event is triggered by the mouse pointer being moved while - * over an object's area (or while passively grabbed to an object). - * - * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an - * #Evas_Event_Mouse_Wheel struct\n\n - * This event is triggered by the mouse wheel being rolled while the - * mouse pointer is over an object (or passively grabbed to an - * object). - * - * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an - * #Evas_Event_Multi_Down struct - * - * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an - * #Evas_Event_Multi_Up struct - * - * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an - * #Evas_Event_Multi_Move struct - * - * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n - * 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 it returns, there - * is no guarantee on the object's validity. - * - * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an - * #Evas_Event_Key_Down struct\n\n - * 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: @p event_info is a pointer to an - * #Evas_Event_Key_Up struct \n\n - * 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: @p event_info is @c NULL \n\n - * This event is called when an object gains the focus. When it is - * called the object has already gained the focus. - * - * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n - * This event is triggered when an object loses the focus. When it - * is called the object has already lost the focus. - * - * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n - * This event is triggered by the object being shown by - * evas_object_show(). - * - * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n - * This event is triggered by an object being hidden by - * evas_object_hide(). - * - * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n - * 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: @p event_info is @c NULL \n\n - * 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. - * - * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n - * This event is triggered by an object being re-stacked. Stacking - * changes can be triggered by - * evas_object_stack_below()/evas_object_stack_above() and others. - * - * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL. - * - * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an - * #Evas_Event_Hold struct - * - * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL. - * - * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL. - * - * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL. - * - * @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. - * - * Example: - * @dontinclude evas-events.c - * @skip evas_object_event_callback_add( - * @until } - * - * See the full example @ref Example_Evas_Events "here". - * - */ - 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); - -/** - * Add (register) a callback function to a given Evas object event with a - * non-default priority set. Except for the priority field, it's exactly the - * same as @ref evas_object_event_callback_add - * - * @param obj Object to attach a callback to - * @param type The type of event that will trigger the callback - * @param priority The priority of the callback, lower values called first. - * @param func The function to be called when the event is triggered - * @param data The data pointer to be passed to @p func - * - * @see evas_object_event_callback_add - * @since 1.1.0 - */ -EAPI void evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); - -/** - * 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 (unregister) a callback function registered to a given - * Evas object event. - * - * @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. In errors, @c NULL will be returned. - * - * @note For deletion of Evas object events callbacks filtering by - * just type and function pointer, user - * evas_object_event_callback_del(). - * - * 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 whether an Evas object is to pass (ignore) events. - * - * @param obj the Evas object to operate on - * @param pass whether @p obj is to pass events (@c EINA_TRUE) or not - * (@c EINA_FALSE) - * - * If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b - * ignored. They will be triggered on the @b next lower object (that - * is not set to pass events), instead (see evas_object_below_get()). - * - * If @p pass is @c EINA_FALSE, events will be processed on that - * object as normal. - * - * @see evas_object_pass_events_get() for an example - * @see evas_object_repeat_events_set() - * @see evas_object_propagate_events_set() - * @see evas_object_freeze_events_set() - */ -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 (ignore) events. - * - * @param obj the Evas object to get information from. - * @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not - * (@c EINA_FALSE) - * - * Example: - * @dontinclude evas-stacking.c - * @skip if (strcmp(ev->keyname, "p") == 0) - * @until } - * - * See the full @ref Example_Evas_Stacking "example". - * - * @see evas_object_pass_events_set() - * @see evas_object_repeat_events_get() - * @see evas_object_propagate_events_get() - * @see evas_object_freeze_events_get() - */ -EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set whether an Evas object is to repeat events. - * - * @param obj the Evas object to operate on - * @param repeat whether @p obj is to repeat events (@c EINA_TRUE) or not - * (@c EINA_FALSE) - * - * If @p repeat is @c EINA_TRUE, it will make events on @p obj to also - * be repeated for the @b next lower object in the objects' stack (see - * see evas_object_below_get()). - * - * If @p repeat is @c EINA_FALSE, events occurring on @p obj will be - * processed only on it. - * - * Example: - * @dontinclude evas-stacking.c - * @skip if (strcmp(ev->keyname, "r") == 0) - * @until } - * - * See the full @ref Example_Evas_Stacking "example". - * - * @see evas_object_repeat_events_get() - * @see evas_object_pass_events_set() - * @see evas_object_propagate_events_set() - * @see evas_object_freeze_events_set() - */ -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 the given Evas object pointer - * @retrieve whether @p obj is set to repeat events (@c EINA_TRUE) - * or not (@c EINA_FALSE) - * - * @see evas_object_repeat_events_set() for an example - * @see evas_object_pass_events_get() - * @see evas_object_propagate_events_get() - * @see evas_object_freeze_events_get() - */ -EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set whether events on a smart object's member should get propagated - * up to its parent. - * - * @param obj the smart object's child to operate on - * @param prop whether to propagate events (@c EINA_TRUE) or not (@c - * EINA_FALSE) - * - * This function has @b no effect if @p obj is not a member of a smart - * object. - * - * If @p prop is @c EINA_TRUE, events occurring on this object will be - * propagated on to the smart object of which @p obj is a member. If - * @p prop is @c EINA_FALSE, events occurring on this object will @b - * not be propagated on to the smart object of which @p obj is a - * member. The default value is @c EINA_TRUE. - * - * @see evas_object_propagate_events_get() - * @see evas_object_repeat_events_set() - * @see evas_object_pass_events_set() - * @see evas_object_freeze_events_set() - */ -EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1); - -/** - * Retrieve whether an Evas object is set to propagate events. - * - * @param obj the given Evas object pointer - * @return whether @p obj is set to propagate events (@c EINA_TRUE) - * or not (@c EINA_FALSE) - * - * @see evas_object_propagate_events_set() - * @see evas_object_repeat_events_get() - * @see evas_object_pass_events_get() - * @see evas_object_freeze_events_get() - */ -EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set whether an Evas object is to freeze (discard) events. - * - * @param obj the Evas object to operate on - * @param pass whether @p obj is to freeze events (@c EINA_TRUE) or not - * (@c EINA_FALSE) - * - * If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b - * discarded. Unlike evas_object_pass_events_set(), events will not be - * passed to @b next lower object. This API can be used for blocking - * events while @p obj is on transiting. - * - * If @p freeze is @c EINA_FALSE, events will be processed on that - * object as normal. - * - * @see evas_object_freeze_events_get() - * @see evas_object_pass_events_set() - * @see evas_object_repeat_events_set() - * @see evas_object_propagate_events_set() - * @since 1.1.0 - */ -EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) EINA_ARG_NONNULL(1); - -/** - * Determine whether an object is set to freeze (discard) events. - * - * @param obj the Evas object to get information from. - * @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or - * not (@c EINA_FALSE) - * - * @see evas_object_freeze_events_set() - * @see evas_object_pass_events_get() - * @see evas_object_repeat_events_get() - * @see evas_object_propagate_events_get() - * @since 1.1.0 - */ -EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspective, 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. - * - * @section sec-map-points Map points - * @subsection subsec-rotation Rotation - * - * A map consists of a set of points, currently only four are supported. Each - * of these points contains a set of canvas coordinates @c x and @c y that - * can be used to alter the geometry of the mapped object, and a @c z - * coordinate that indicates the depth of that point. This last coordinate - * does not normally affect the map, but it's used by several of the utility - * functions to calculate the right position of the point given other - * parameters. - * - * The coordinates for each point are set with evas_map_point_coord_set(). - * The following image shows a map set to match the geometry of an existing - * object. - * - * @image html map-set-map-points-1.png - * @image rtf map-set-map-points-1.png - * @image latex map-set-map-points-1.eps - * - * This is a common practice, so there are a few functions that help make it - * easier. - * - * evas_map_util_points_populate_from_geometry() sets the coordinates of each - * point in the given map to match the rectangle defined by the function - * parameters. - * - * evas_map_util_points_populate_from_object() and - * evas_map_util_points_populate_from_object_full() both take an object and - * set the map points to match its geometry. The difference between the two - * is that the first function sets the @c z value of all points to 0, while - * the latter receives the value to set in said coordinate as a parameter. - * - * The following lines of code all produce the same result as in the image - * above. - * @code - * evas_map_util_points_populate_from_geometry(m, 100, 100, 200, 200, 0); - * // Assuming o is our original object - * evas_object_move(o, 100, 100); - * evas_object_resize(o, 200, 200); - * evas_map_util_points_populate_from_object(m, o); - * evas_map_util_points_populate_from_object_full(m, o, 0); - * @endcode - * - * Several effects can be applied to an object by simply setting each point - * of the map to the right coordinates. For example, a simulated perspective - * could be achieve as follows. - * - * @image html map-set-map-points-2.png - * @image rtf map-set-map-points-2.png - * @image latex map-set-map-points-2.eps - * - * As said before, the @c z coordinate is unused here so when setting points - * by hand, its value is of no importance. - * - * @image html map-set-map-points-3.png - * @image rtf map-set-map-points-3.png - * @image latex map-set-map-points-3.eps - * - * In all three cases above, setting the map to be used by the object is the - * same. - * @code - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * @endcode - * - * Doing things this way, however, is a lot of work that can be avoided by - * using the provided utility functions, as described in the next section. - * - * @section map-utils Utility functions - * - * Utility functions take an already set up map and alter it to produce a - * specific effect. For example, to rotate an object around its own center - * you would need to take the rotation angle, the coordinates of each corner - * of the object and do all the math to get the new set of coordinates that - * need to tbe set in the map. - * - * Or you can use this code: - * @code - * evas_object_geometry_get(o, &x, &y, &w, &h); - * m = evas_map_new(4); - * evas_map_util_points_populate_from_object(m, o); - * evas_map_util_rotate(m, 45, x + (w / 2), y + (h / 2)); - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * evas_map_free(m); - * @endcode - * - * Which will rotate the object around its center point in a 45 degree angle - * in the clockwise direction, taking it from this - * - * @image html map-rotation-2d-1.png - * @image rtf map-rotation-2d-1.png - * @image latex map-rotation-2d-1.eps - * - * to this - * - * @image html map-rotation-2d-2.png - * @image rtf map-rotation-2d-2.png - * @image latex map-rotation-2d-2.eps - * - * Objects may be rotated around any other point just by setting the last two - * paramaters of the evas_map_util_rotate() function to the right values. A - * circle of roughly the diameter of the object overlaid on each image shows - * where the center of rotation is set for each example. - * - * For example, this code - * @code - * evas_object_geometry_get(o, &x, &y, &w, &h); - * m = evas_map_new(4); - * evas_map_util_points_populate_from_object(m, o); - * evas_map_util_rotate(m, 45, x + w - 20, y + h - 20); - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * evas_map_free(m); - * @endcode - * - * produces something like - * - * @image html map-rotation-2d-3.png - * @image rtf map-rotation-2d-3.png - * @image latex map-rotation-2d-3.eps - * - * And the following - * @code - * evas_output_size_get(evas, &w, &h); - * m = evas_map_new(4); - * evas_map_util_points_populate_from_object(m, o); - * evas_map_util_rotate(m, 45, w, h); - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * evas_map_free(m); - * @endcode - * - * rotates the object around the center of the window - * - * @image html map-rotation-2d-4.png - * @image rtf map-rotation-2d-4.png - * @image latex map-rotation-2d-4.eps - * - * @subsection subsec-3d 3D Maps - * - * Maps can also be used to achieve the effect of 3-dimensionality. When doing - * this, the @c z coordinate of each point counts, with higher values meaning - * the point is further into the screen, and smaller values (negative, usually) - * meaning the point is closwer towards the user. - * - * Thinking in 3D also introduces the concept of back-face of an object. An - * object is said to be facing the user when all its points are placed in a - * clockwise fashion. The next image shows this, with each point showing the - * with which is identified within the map. - * - * @image html map-point-order-face.png - * @image rtf map-point-order-face.png - * @image latex map-point-order-face.eps - * - * Rotating this map around the @c Y axis would leave the order of the points - * in a counter-clockwise fashion, as seen in the following image. - * - * @image html map-point-order-back.png - * @image rtf map-point-order-back.png - * @image latex map-point-order-back.eps - * - * This way we can say that we are looking at the back face of the object. - * This will have stronger implications later when we talk about lighting. - * - * To know if a map is facing towards the user or not it's enough to use - * the evas_map_util_clockwise_get() function, but this is normally done - * after all the other operations are applied on the map. - * - * @subsection subsec-3d-rot 3D rotation and perspective - * - * Much like evas_map_util_rotate(), there's the function - * evas_map_util_3d_rotate() that transforms the map to apply a 3D rotation - * to an object. As in its 2D counterpart, the rotation can be applied around - * any point in the canvas, this time with a @c z coordinate too. The rotation - * can also be around any of the 3 axis. - * - * Starting from this simple setup - * - * @image html map-3d-basic-1.png - * @image rtf map-3d-basic-1.png - * @image latex map-3d-basic-1.eps - * - * and setting maps so that the blue square to rotate on all axis around a - * sphere that uses the object as its center, and the red square to rotate - * around the @c Y axis, we get the following. A simple overlay over the image - * shows the original geometry of each object and the axis around which they - * are being rotated, with the @c Z one not appearing due to being orthogonal - * to the screen. - * - * @image html map-3d-basic-2.png - * @image rtf map-3d-basic-2.png - * @image latex map-3d-basic-2.eps - * - * which doesn't look very real. This can be helped by adding perspective - * to the transformation, which can be simply done by calling - * evas_map_util_3d_perspective() on the map after its position has been set. - * The result in this case, making the vanishing point the center of each - * object: - * - * @image html map-3d-basic-3.png - * @image rtf map-3d-basic-3.png - * @image latex map-3d-basic-3.eps - * - * @section sec-color Color and lighting - * - * Each point in a map can be set to a color, which will be multiplied with - * the objects own color and linearly interpolated in between adjacent points. - * This is done with evas_map_point_color_set() for each point of the map, - * or evas_map_util_points_color_set() to set every point to the same color. - * - * When using 3D effects, colors can be used to improve the looks of them by - * simulating a light source. The evas_map_util_3d_lighting() function makes - * this task easier by taking the coordinates of the light source and its - * color, along with the color of the ambient light. Evas then sets the color - * of each point based on the distance to the light source, the angle with - * which the object is facing the light and the ambient light. Here, the - * orientation of each point as explained before, becomes more important. - * If the map is defined counter-clockwise, the object will be facing away - * from the user and thus become obscured, since no light would be reflecting - * from it. - * - * @image html map-light.png - * @image rtf map-light.png - * @image latex map-light.eps - * @note Object facing the light source - * - * @image html map-light2.png - * @image rtf map-light2.png - * @image latex map-light2.eps - * @note Same object facing away from the user - * - * @section Image mapping - * - * @image html map-uv-mapping-1.png - * @image rtf map-uv-mapping-1.png - * @image latex map-uv-mapping-1.eps - * - * Images need some special handling when mapped. Evas can easily take care - * of objects and do almost anything with them, but it's completely oblivious - * to the content of images, so each point in the map needs to be told to what - * pixel in the source image it belongs. Failing to do may sometimes result - * in the expected behavior, or it may look like a partial work. - * - * The next image illustrates one possibility of a map being set to an image - * object, without setting the right UV mapping for each point. The objects - * themselves are mapped properly to their new geometry, but the image content - * may not be displayed correctly within the mapped object. - * - * @image html map-uv-mapping-2.png - * @image rtf map-uv-mapping-2.png - * @image latex map-uv-mapping-2.eps - * - * Once Evas knows how to handle the source image within the map, it will - * transform it as needed. This is done with evas_map_point_image_uv_set(), - * which tells the map to which pixel in image it maps. - * - * To match our example images to the maps above all we need is the size of - * each image, which can always be found with evas_object_image_size_get(). - * - * @code - * evas_map_point_image_uv_set(m, 0, 0, 0); - * evas_map_point_image_uv_set(m, 1, 150, 0); - * evas_map_point_image_uv_set(m, 2, 150, 200); - * evas_map_point_image_uv_set(m, 3, 0, 200); - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * - * evas_map_point_image_uv_set(m, 0, 0, 0); - * evas_map_point_image_uv_set(m, 1, 120, 0); - * evas_map_point_image_uv_set(m, 2, 120, 160); - * evas_map_point_image_uv_set(m, 3, 0, 160); - * evas_object_map_set(o2, m); - * evas_object_map_enable_set(o2, EINA_TRUE); - * @endcode - * - * To get - * - * @image html map-uv-mapping-3.png - * @image rtf map-uv-mapping-3.png - * @image latex map-uv-mapping-3.eps - * - * Maps can also be set to use part of an image only, or even map them inverted, - * and combined with evas_object_image_source_set() it can be used to achieve - * more interesting results. - * - * @code - * evas_object_image_size_get(evas_object_image_source_get(o), &w, &h); - * evas_map_point_image_uv_set(m, 0, 0, h); - * evas_map_point_image_uv_set(m, 1, w, h); - * evas_map_point_image_uv_set(m, 2, w, h / 3); - * evas_map_point_image_uv_set(m, 3, 0, h / 3); - * evas_object_map_set(o, m); - * evas_object_map_enable_set(o, EINA_TRUE); - * @endcode - * - * @image html map-uv-mapping-4.png - * @image rtf map-uv-mapping-4.png - * @image latex map-uv-mapping-4.eps - * - * Examples: - * @li @ref Example_Evas_Map_Overview - * - * @ingroup Evas_Object_Group - * - * @{ - */ - -/** - * Enable or disable the map that is set. - * - * Enable or disable the use of map for the object @p obj. - * On enable, the object geometry will be saved, and the new geometry will - * change (position and size) to reflect the map geometry set. - * - * If the object doesn't have a map set (with evas_object_map_set()), the - * initial geometry will be undefined. It is advised to always set a map - * to the object first, and then call this function to enable its use. - * - * @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 - * - * @param obj object to set the map source of - * @return the object set as the source - * - * @see evas_object_map_source_set() - */ -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 access 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 degrees (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 specify how much to zoom in the X and Y direction respectively. - * A value of 1.0 means "don't zoom". 2.0 means "double 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() 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 around X axis. - * @param dy amount of degrees from 0.0 to 360.0 to rotate around Y axis. - * @param dz amount of degrees from 0.0 to 360.0 to rotate around 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. - * - * @image html map-light3.png - * @image rtf map-light3.png - * @image latex map-light3.eps - * @note Grey object, no lighting used - * - * @image html map-light4.png - * @image rtf map-light4.png - * @image latex map-light4.eps - * @note Lights out! Every color set to 0 - * - * @image html map-light5.png - * @image rtf map-light5.png - * @image latex map-light5.eps - * @note Ambient light to full black, red light coming from close at the - * bottom-left vertex - * - * @image html map-light6.png - * @image rtf map-light6.png - * @image latex map-light6.eps - * @note Same light as before, but not the light is set to 0 and ambient light - * is cyan - * - * @image html map-light7.png - * @image rtf map-light7.png - * @image latex map-light7.eps - * @note Both lights are on - * - * @image html map-light8.png - * @image rtf map-light8.png - * @image latex map-light8.eps - * @note Both lights again, but this time both are the same color. - * - * @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 specifies the z value at which there is a 1:1 - * mapping between spatial coordinates 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 perspective distance X coordinate - * @param py The perspective 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. - * Setting this off 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 alpha 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 fixed point's coordinate in the map. Note that points - * describe the outline of a quadrangle and are ordered either clockwise - * or anti-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 quadrangle. - * - * 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 resize - * 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 that another object that acts as a - * manager (see @ref Evas_Smart_Object_Group) may know how to properly - * position and resize its subordinate objects. The Size Hints provide - * a common interface that is recommended as the protocol for such - * information. - * - * For example, box objects use alignment hints to align its - * lines/columns inside its container, padding hints to set the - * padding between each individual child, etc. - * - * Examples on their usage: - * - @ref Example_Evas_Size_Hints "evas-hints.c" - * - @ref Example_Evas_Aspect_Hints "evas-aspect-hints.c" - * - * @ingroup Evas_Object_Group - */ - -/** - * @addtogroup Evas_Object_Group_Size_Hints - * @{ - */ - -/** - * Retrieves the hints for an object's minimum size. - * - * @param obj The given Evas object to query hints from. - * @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. - * - * These are hints on the minimim sizes @p obj should have. This is - * not a size enforcement in any way, it's just a hint that should be - * used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_size_hint_min_set() for an example - */ -EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - -/** - * Sets the hints for an object's minimum size. - * - * @param obj The given Evas object to query hints from. - * @param w Integer to use as the minimum width hint. - * @param h Integer to use as the minimum height hint. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * Values @c 0 will be treated as unset hint components, when queried - * by managers. - * - * Example: - * @dontinclude evas-hints.c - * @skip evas_object_size_hint_min_set - * @until return - * - * In this example the minimum size hints change the behavior of an - * Evas box when layouting its children. See the full @ref - * Example_Evas_Size_Hints "example". - * - * @see evas_object_size_hint_min_get() - */ -EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - -/** - * Retrieves the hints for an object's maximum size. - * - * @param obj The given Evas object to query hints from. - * @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. - * - * These are hints on the maximum sizes @p obj should have. This is - * not a size enforcement in any way, it's just a hint that should be - * used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_size_hint_max_set() - */ -EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - -/** - * Sets the hints for an object's maximum size. - * - * @param obj The given Evas object to query hints from. - * @param w Integer to use as the maximum width hint. - * @param h Integer to use as the maximum height hint. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * Values @c -1 will be treated as unset hint components, when queried - * by managers. - * - * Example: - * @dontinclude evas-hints.c - * @skip evas_object_size_hint_max_set - * @until return - * - * In this example the maximum size hints change the behavior of an - * Evas box when layouting its children. See the full @ref - * Example_Evas_Size_Hints "example". - * - * @see evas_object_size_hint_max_get() - */ -EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - -/** - * Retrieves the hints for an object's optimum size. - * - * @param obj The given Evas object to query hints from. - * @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. - * - * These are hints on the optimum sizes @p obj should have. This is - * not a size enforcement in any way, it's just a hint that should be - * used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_size_hint_request_set() - */ -EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - -/** - * Sets the hints for an object's optimum size. - * - * @param obj The given Evas object to query hints from. - * @param w Integer to use as the preferred width hint. - * @param h Integer to use as the preferred height hint. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * Values @c 0 will be treated as unset hint components, when queried - * by managers. - * - * @see evas_object_size_hint_request_get() - */ -EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); - -/** - * Retrieves the hints for an object's aspect ratio. - * - * @param obj The given Evas object to query hints from. - * @param aspect Returns the policy/type of aspect ratio applied to @p obj. - * @param w Pointer to an integer in which to store the aspect's width - * ratio term. - * @param h Pointer to an integer in which to store the aspect's - * height ratio term. - * - * The different aspect ratio policies are documented in the - * #Evas_Aspect_Control type. A container respecting these size hints - * would @b resize its children accordingly to those policies. - * - * For any policy, if any of the given aspect ratio terms are @c 0, - * the object's container should ignore the aspect and scale @p obj to - * occupy the whole available area. If they are both positive - * integers, that proportion will be respected, under each scaling - * policy. - * - * These images illustrate some of the #Evas_Aspect_Control policies: - * - * @image html any-policy.png - * @image rtf any-policy.png - * @image latex any-policy.eps - * - * @image html aspect-control-none-neither.png - * @image rtf aspect-control-none-neither.png - * @image latex aspect-control-none-neither.eps - * - * @image html aspect-control-both.png - * @image rtf aspect-control-both.png - * @image latex aspect-control-both.eps - * - * @image html aspect-control-horizontal.png - * @image rtf aspect-control-horizontal.png - * @image latex aspect-control-horizontal.eps - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * Example: - * @dontinclude evas-aspect-hints.c - * @skip if (strcmp(ev->keyname, "c") == 0) - * @until } - * - * See the full @ref Example_Evas_Aspect_Hints "example". - * - * @see evas_object_size_hint_aspect_set() - */ -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 hints for an object's aspect ratio. - * - * @param obj The given Evas object to query hints from. - * @param aspect The policy/type of aspect ratio to apply to @p obj. - * @param w Integer to use as aspect width ratio term. - * @param h Integer to use as aspect height ratio term. - * - * This is not a size enforcement in any way, it's just a hint that should - * be used whenever appropriate. - * - * If any of the given aspect ratio terms are @c 0, - * the object's container will ignore the aspect and scale @p obj to - * occupy the whole available area, for any given policy. - * - * @see evas_object_size_hint_aspect_get() for more information. - */ -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 hints for on object's alignment. - * - * @param obj The given Evas object to query hints from. - * @param x Pointer to a double in which to store the horizontal - * alignment hint. - * @param y Pointer to a double in which to store the vertical - * alignment hint. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_size_hint_align_set() for more information - */ -EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); - -/** - * Sets the hints for an object's alignment. - * - * @param obj The given Evas object to query hints from. - * @param x Double, ranging from @c 0.0 to @c 1.0 or with the - * special value #EVAS_HINT_FILL, to use as horizontal alignment hint. - * @param y Double, ranging from @c 0.0 to @c 1.0 or with the - * special value #EVAS_HINT_FILL, to use as vertical alignment hint. - * - * These are hints on how to align an object inside the boundaries - * of a container/manager. Accepted values are in the @c 0.0 to @c - * 1.0 range, with the special value #EVAS_HINT_FILL used to specify - * "justify" or "fill" by some users. In this case, maximum size hints - * should be enforced with higher priority, if they are set. Also, any - * padding hint set on objects should add up to the alignment space on - * the final scene composition. - * - * See documentation of possible users: in Evas, they are the @ref - * Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart - * objects. - * - * For the horizontal component, @c 0.0 means to the left, @c 1.0 - * means to the right. Analogously, for the vertical component, @c 0.0 - * to the top, @c 1.0 means to the bottom. - * - * See the following figure: - * - * @image html alignment-hints.png - * @image rtf alignment-hints.png - * @image latex alignment-hints.eps - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * Example: - * @dontinclude evas-hints.c - * @skip evas_object_size_hint_align_set - * @until return - * - * In this example the alignment hints change the behavior of an Evas - * box when layouting its children. See the full @ref - * Example_Evas_Size_Hints "example". - * - * @see evas_object_size_hint_align_get() - * @see evas_object_size_hint_max_set() - * @see evas_object_size_hint_padding_set() - */ -EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); - -/** - * Retrieves the hints for an object's weight. - * - * @param obj The given Evas object to query hints from. - * @param x Pointer to a double in which to store the horizontal weight. - * @param y Pointer to a double in which to store the vertical weight. - * - * Accepted values are zero or positive values. Some users might use - * this hint as a boolean, but some might consider it as a @b - * proportion, see documentation of possible users, which in Evas are - * the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table" - * smart objects. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_size_hint_weight_set() for an example - */ -EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); - -/** - * Sets the hints for an object's weight. - * - * @param obj The given Evas object to query hints from. - * @param x Nonnegative double value to use as horizontal weight hint. - * @param y Nonnegative double value to use as vertical weight hint. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * This is a hint on how a container object should @b resize a given - * child within its area. Containers may adhere to the simpler logic - * of just expanding the child object's dimensions to fit its own (see - * the #EVAS_HINT_EXPAND helper weight macro) or the complete one of - * taking each child's weight hint as real @b weights to how much of - * its size to allocate for them in each axis. A container is supposed - * to, after @b normalizing the weights of its children (with weight - * hints), distribute the space it has to layout them by those factors - * -- most weighted children get larger in this process than the least - * ones. - * - * Example: - * @dontinclude evas-hints.c - * @skip evas_object_size_hint_weight_set - * @until return - * - * In this example the weight hints change the behavior of an Evas box - * when layouting its children. See the full @ref - * Example_Evas_Size_Hints "example". - * - * @see evas_object_size_hint_weight_get() for more information - */ -EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); - -/** - * Retrieves the hints for an object's padding space. - * - * @param obj The given Evas object to query hints from. - * @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. - * - * Padding is extra space an object takes on each of its delimiting - * rectangle sides, in canvas units. This space will be rendered - * transparent, naturally, as in the following figure: - * - * @image html padding-hints.png - * @image rtf padding-hints.png - * @image latex padding-hints.eps - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * @note Use @c NULL pointers on the hint components you're not - * interested in: they'll be ignored by the function. - * - * Example: - * @dontinclude evas-hints.c - * @skip evas_object_size_hint_padding_set - * @until return - * - * In this example the padding hints change the behavior of an Evas box - * when layouting its children. See the full @ref - * Example_Evas_Size_Hints "example". - * - * @see evas_object_size_hint_padding_set() - */ -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 hints for an object's padding space. - * - * @param obj The given Evas object to query hints from. - * @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. - * - * This is not a size enforcement in any way, it's just a hint that - * should be used whenever appropriate. - * - * @see evas_object_size_hint_padding_get() for more information - */ -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. - * - * Examples on this group of functions can be found @ref - * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". - * - * @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 pointer to the data to be attached - * - * This attaches the pointer @p data to the object @p obj, given the - * access 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 @c 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. - * - * @note This function is very handy when you have data associated - * specifically to an Evas object, being of use only when dealing with - * it. Than you don't have the burden to a pointer to it elsewhere, - * using this family of functions. - * - * 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 on an Evas object 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 a data pointer was stored under the given key, that pointer - * will be returned. If this is not the case, @c NULL will be - * returned, signifying an invalid object or a non-existent key. It is - * possible that a @c NULL pointer was stored given that key, but this - * situation is non-sensical and thus can be considered an error as - * well. @c 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); - -/** - * Delete an 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 this same pointer, if actually there was data - * there, or @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); - - -/** - * 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); - - -/** - * 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 means no scaling, - * default size. - * - * This will multiply the object's dimension by the given factor, thus - * altering its geometry (width and height). Useful when you want - * scalable UI elements, possibly at run time. - * - * @note Only text and textblock objects have scaling change - * handlers. Other objects won't change visually on this call. - * - * @see evas_object_scale_get() - * - * @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 - * - * @see evas_object_scale_set() - */ -EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * 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); - -/** - * Set whether to use precise (usually expensive) point collision - * detection for a given Evas object. - * - * @param obj The given object. - * @param precise whether to use precise point collision detection or - * not The default value is false. - * - * Use this function to make Evas treat objects' transparent areas as - * @b not belonging to it with regard to mouse pointer events. By - * default, all of the object's boundary rectangle will be taken in - * account for them. - * - * @warning By using precise point collision detection you'll be - * making Evas more resource intensive. - * - * Example code follows. - * @dontinclude evas-events.c - * @skip if (strcmp(ev->keyname, "p") == 0) - * @until } - * - * See the full example @ref Example_Evas_Events "here". - * - * @see evas_object_precise_is_inside_get() - * @ingroup Evas_Object_Group_Extras - */ - EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1); - -/** - * Determine whether an object is set to use precise point collision - * detection. - * - * @param obj The given object. - * @return whether @p obj is set to use precise point collision - * detection or not The default value is false. - * - * @see evas_object_precise_is_inside_set() for an example - * - * @ingroup Evas_Object_Group_Extras - */ - EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set a hint flag on the given Evas object that it's used as a "static - * clipper". - * - * @param obj The given object. - * @param is_static_clip @c EINA_TRUE if it's to be used as a static - * clipper, @c EINA_FALSE otherwise - * - * This is a hint to Evas that this object is used as a big static - * clipper and shouldn't be moved with children and otherwise - * considered specially. The default value for new objects is @c - * EINA_FALSE. - * - * @see evas_object_static_clip_get() - * - * @ingroup Evas_Object_Group_Extras - */ - EAPI void evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1); - -/** - * Get the "static clipper" hint flag for a given Evas object. - * - * @param obj The given object. - * @returrn @c EINA_TRUE if it's set as a static clipper, @c - * EINA_FALSE otherwise - * - * @see evas_object_static_clip_set() for more details - * - * @ingroup Evas_Object_Group_Extras - */ - EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @defgroup Evas_Object_Group_Find Finding Objects - * - * Functions that allows finding objects by their position, name or - * other properties. - * - * @ingroup Evas_Object_Group - */ - -/** - * @addtogroup Evas_Object_Group_Find - * @{ - */ - -/** - * 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 key events 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); - -/** - * 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. - * - * This looks for the evas object given a name by evas_object_name_set(). If - * the name is not unique canvas-wide, then which one of the many objects - * with that name is returned is undefined, so only use this if you can ensure - * the object name is unique. - * - * @ingroup Evas_Object_Group_Find - */ -EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieves the object from children of the given object with the given name. - * @param obj The parent (smart) object whose children to search. - * @param name The given name. - * @param recurse Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). - * @return If successful, the Evas object with the given name. Otherwise, - * @c NULL. - * - * This looks for the evas object given a name by evas_object_name_set(), but - * it ONLY looks at the children of the object *p obj, and will only recurse - * into those children if @p recurse is greater than 0. If the name is not - * unique within immediate children (or the whole child tree) then it is not - * defined which child object will be returned. If @p recurse is set to -1 then - * it will recurse without limit. - * - * @since 1.2 - * - * @ingroup Evas_Object_Group_Find - */ -EAPI Evas_Object *evas_object_name_child_find (const Evas_Object *obj, const char *name, int recurse) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieve the Evas object stacked at the top of a given position in - * a canvas - * - * @param e A handle to the canvas. - * @param x The horizontal coordinate of the position - * @param y The vertical coordinate of the position - * @param include_pass_events_objects Boolean flag to include or not - * objects which pass events in this calculation - * @param include_hidden_objects Boolean flag to include or not hidden - * objects in this calculation - * @return The Evas object that is over all other objects at the given - * position. - * - * This function will traverse all the layers of the given canvas, - * from top to bottom, querying for objects with areas covering the - * given position. The user can remove from from the query - * objects which are hidden and/or which are set to pass events. - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieve the Evas object stacked at the top at the position of the - * mouse cursor, over a given canvas - * - * @param e A handle to the canvas. - * @return The Evas object that is over all other objects at the mouse - * pointer's position - * - * This function will traverse all the layers of the given canvas, - * from top to bottom, querying for objects with areas covering the - * mouse pointer's position, over @p e. - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieve the Evas object stacked at the top of a given rectangular - * region in a canvas - * - * @param e A handle to the canvas. - * @param x The top left corner's horizontal coordinate for the - * rectangular region - * @param y The top left corner's vertical coordinate for the - * rectangular region - * @param w The width of the rectangular region - * @param h The height of the rectangular region - * @param include_pass_events_objects Boolean flag to include or not - * objects which pass events in this calculation - * @param include_hidden_objects Boolean flag to include or not hidden - * objects in this calculation - * @return The Evas object that is over all other objects at the given - * rectangular region. - * - * This function will traverse all the layers of the given canvas, - * from top to bottom, querying for objects with areas overlapping - * with the given rectangular region inside @p e. The user can remove - * from the query objects which are hidden and/or which are set to - * pass events. - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieve a list of Evas objects lying over a given position in - * a canvas - * - * @param e A handle to the canvas. - * @param x The horizontal coordinate of the position - * @param y The vertical coordinate of the position - * @param include_pass_events_objects Boolean flag to include or not - * objects which pass events in this calculation - * @param include_hidden_objects Boolean flag to include or not hidden - * objects in this calculation - * @return The list of Evas objects that are over the given position - * in @p e - * - * This function will traverse all the layers of the given canvas, - * from top to bottom, querying for objects with areas covering the - * given position. The user can remove from from the query - * objects which are hidden and/or which are set to pass events. - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the lowest (stacked) Evas object on the canvas @p - * - * @param e a valid canvas pointer - * @return a pointer to the lowest object on it, if any, or @c NULL, - * otherwise - * - * This function will take all populated layers in the canvas into - * account, getting the lowest object for the lowest layer, naturally. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_below_get() - * @see evas_object_above_get() - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the highest (stacked) Evas object on the canvas @p - * - * @param e a valid canvas pointer - * @return a pointer to the highest object on it, if any, or @c NULL, - * otherwise - * - * This function will take all populated layers in the canvas into - * account, getting the highest object for the highest layer, - * naturally. - * - * @see evas_object_layer_get() - * @see evas_object_layer_set() - * @see evas_object_below_get() - * @see evas_object_above_get() - * - * @warning This function will @b skip objects parented by smart - * objects, acting only on the ones at the "top level", with regard to - * object parenting. - */ -EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @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 - */ - -/** - * @addtogroup Evas_Object_Group_Interceptors - * @{ - */ - -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 - * - * @brief Function to create evas rectangle objects. - * - * There is only one function to deal with rectangle objects, this may make this - * function seem useless given there are no functions to manipulate the created - * rectangle, however the rectangle is actually very useful and should be - * manipulated using the generic @ref Evas_Object_Group "evas object functions". - * - * The evas rectangle server a number of key functions when working on evas - * programs: - * @li Background - * @li Debugging - * @li Clipper - * - * @section Background - * - * One extremely common requirement of evas programs is to have a solid color - * background, this can be accomplished with the following very simple code: - * @code - * Evas_Object *bg = evas_object_rectangle_add(evas_canvas); - * //Here we set the rectangles red, green, blue and opacity levels - * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background - * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas - * evas_object_show(bg); - * @endcode - * - * This however will have issues if the @c evas_canvas is resized, however most - * windows are created using ecore evas and that has a solution to using the - * rectangle as a background: - * @code - * Evas_Object *bg = evas_object_rectangle_add(ecore_evas_get(ee)); - * //Here we set the rectangles red, green, blue and opacity levels - * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background - * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas - * evas_object_show(bg); - * ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); - * @endcode - * So this gives us a white background to our window that will be resized - * together with it. - * - * @section Debugging - * - * Debugging is a major part of any programmers task and when debugging visual - * issues with evas programs the rectangle is an extremely useful tool. The - * rectangle's simplicity means that it's easier to pinpoint issues with it than - * with more complex objects. Therefore a common technique to use when writing - * an evas program and not getting the desired visual result is to replace the - * misbehaving object for a solid color rectangle and seeing how it interacts - * with the other elements, this often allows us to notice clipping, parenting - * or positioning issues. Once the issues have been identified and corrected the - * rectangle can be replaced for the original part and in all likelihood any - * remaining issues will be specific to that object's type. - * - * @section clipping Clipping - * - * Clipping serves two main functions: - * @li Limiting visibility(i.e. hiding portions of an object). - * @li Applying a layer of color to an object. - * - * @subsection hiding Limiting visibility - * - * It is often necessary to show only parts of an object, while it may be - * possible to create an object that corresponds only to the part that must be - * shown(and it isn't always possible) it's usually easier to use a a clipper. A - * clipper is a rectangle that defines what's visible and what is not. The way - * to do this is to create a solid white rectangle(which is the default, no need - * to call evas_object_color_set()) and give it a position and size of what - * should be visible. The following code exemplifies showing the center half of - * @c my_evas_object: - * @code - * Evas_Object *clipper = evas_object_rectangle_add(evas_canvas); - * evas_object_move(clipper, my_evas_object_x / 4, my_evas_object_y / 4); - * evas_object_resize(clipper, my_evas_object_width / 2, my_evas_object_height / 2); - * evas_object_clip_set(my_evas_object, clipper); - * evas_object_show(clipper); - * @endcode - * - * @subsection color Layer of color - * - * In the @ref clipping section we used a solid white clipper, which produced no - * change in the color of the clipped object, it just hid what was outside the - * clippers area. It is however sometimes desirable to change the of color an - * object, this can be accomplished using a clipper that has a non-white color. - * Clippers with color work by multiplying the colors of clipped object. The - * following code will show how to remove all the red from an object: - * @code - * Evas_Object *clipper = evas_object_rectangle_add(evas); - * evas_object_move(clipper, my_evas_object_x, my_evas_object_y); - * evas_object_resize(clipper, my_evas_object_width, my_evas_object_height); - * evas_object_color_set(clipper, 0, 255, 255, 255); - * evas_object_clip_set(obj, clipper); - * evas_object_show(clipper); - * @endcode - * - * For an example that more fully exercise the use of an evas object rectangle - * see @ref Example_Evas_Object_Manipulation. - * - * @ingroup Evas_Object_Specific - */ - -/** - * Adds a rectangle to the given evas. - * @param e The given evas. - * @return The new rectangle object. - * - * @ingroup Evas_Object_Rectangle - */ -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 - * - * Here are grouped together functions used to create and manipulate - * image objects. They are available to whichever occasion one needs - * complex imagery on a GUI that could not be achieved by the other - * Evas' primitive object types, or to make image manipulations. - * - * Evas will support whichever image file types it was compiled with - * support to (its image loaders) -- check your software packager for - * that information and see - * evas_object_image_extension_can_load_get(). - * - * @section Evas_Object_Image_Basics Image object basics - * - * The most common use of image objects -- to display an image on the - * canvas -- is achieved by a common function triplet: - * @code - * img = evas_object_image_add(canvas); - * evas_object_image_file_set(img, "path/to/img", NULL); - * evas_object_image_fill_set(img, 0, 0, w, h); - * @endcode - * The first function, naturally, is creating the image object. Then, - * one must set an source file on it, so that it knows where to fetch - * image data from. Next, one must set how to fill the image - * object's area with that given pixel data. One could use just a - * sub-region of the original image or even have it tiled repeatedly - * on the image object. For the common case of having the whole source - * image to be displayed on the image object, stretched to the - * destination's size, there's also a function helper, to be used - * instead of evas_object_image_fill_set(): - * @code - * evas_object_image_filled_set(img, EINA_TRUE); - * @endcode - * See those functions' documentation for more details. - * - * @section Evas_Object_Image_Scale Scale and resizing - * - * Resizing of image objects will scale their respective source images - * to their areas, if they are set to "fill" the object's area - * (evas_object_image_filled_set()). If the user wants any control on - * the aspect ratio of an image for different sizes, he/she has to - * take care of that themselves. There are functions to make images to - * get loaded scaled (up or down) in memory, already, if the user is - * going to use them at pre-determined sizes and wants to save - * computations. - * - * Evas has even a scale cache, which will take care of caching scaled - * versions of images with more often usage/hits. Finally, one can - * have images being rescaled @b smoothly by Evas (more - * computationally expensive) or not. - * - * @section Evas_Object_Image_Performance Performance hints - * - * When dealing with image objects, there are some tricks to boost the - * performance of your application, if it does intense image loading - * and/or manipulations, as in animations on a UI. - * - * @subsection Evas_Object_Image_Load Load hints - * - * In image viewer applications, for example, the user will be looking - * at a given image, at full size, and will desire that the navigation - * to the adjacent images on his/her album be fluid and fast. Thus, - * while displaying a given image, the program can be on the - * background loading the next and previous images already, so that - * displaying them on the sequence is just a matter of repainting the - * screen (and not decoding image data). - * - * Evas addresses this issue with image pre-loading. The code - * for the situation above would be something like the following: - * @code - * prev = evas_object_image_filled_add(canvas); - * evas_object_image_file_set(prev, "/path/to/prev", NULL); - * evas_object_image_preload(prev, EINA_TRUE); - * - * next = evas_object_image_filled_add(canvas); - * evas_object_image_file_set(next, "/path/to/next", NULL); - * evas_object_image_preload(next, EINA_TRUE); - * @endcode - * - * If you're loading images which are too big, consider setting - * previously it's loading size to something smaller, in case you - * won't expose them in real size. It may speed up the loading - * considerably: - * @code - * //to load a scaled down version of the image in memory, if that's - * //the size you'll be displaying it anyway - * evas_object_image_load_scale_down_set(img, zoom); - * - * //optional: if you know you'll be showing a sub-set of the image's - * //pixels, you can avoid loading the complementary data - * evas_object_image_load_region_set(img, x, y, w, h); - * @endcode - * Refer to Elementary's Photocam widget for a high level (smart) - * object which does lots of loading speed-ups for you. - * - * @subsection Evas_Object_Image_Animation Animation hints - * - * If you want to animate image objects on a UI (what you'd get by - * concomitant usage of other libraries, like Ecore and Edje), there - * are also some tips on how to boost the performance of your - * application. If the animation involves resizing of an image (thus, - * re-scaling), you'd better turn off smooth scaling on it @b during - * the animation, turning it back on afterwards, for less - * computations. Also, in this case you'd better flag the image object - * in question not to cache scaled versions of it: - * @code - * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC); - * - * // resizing takes place in between - * - * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_STATIC); - * @endcode - * - * Finally, movement of opaque images through the canvas is less - * expensive than of translucid ones, because of blending - * computations. - * - * @section Evas_Object_Image_Borders Borders - * - * Evas provides facilities for one to specify an image's region to be - * treated specially -- as "borders". This will make those regions be - * treated specially on resizing scales, by keeping their aspect. This - * makes setting frames around other objects on UIs easy. - * See the following figures for a visual explanation:\n - * @htmlonly - * - * Full-size - * @endhtmlonly - * @image rtf image-borders.png - * @image latex image-borders.eps width=\textwidth - * @htmlonly - * - * Full-size - * @endhtmlonly - * @image rtf border-effect.png - * @image latex border-effect.eps width=\textwidth - * - * @section Evas_Object_Image_Manipulation Manipulating pixels - * - * Evas image objects can be used to manipulate raw pixels in many - * ways. The meaning of the data in the pixel arrays will depend on - * the image's color space, be warned (see next section). You can set - * your own data as an image's pixel data, fetch an image's pixel data - * for saving/altering, convert images between different color spaces - * and even advanced operations like setting a native surface as image - * objects' data. - * - * @section Evas_Object_Image_Color_Spaces Color spaces - * - * Image objects may return or accept "image data" in multiple - * formats. This is based on the color space 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. - * \n\n - * This colorspace uses premultiplied alpha. That means that R, G - * and B cannot exceed A in value. The conversion from - * non-premultiplied colorspace is: - * \n\n - * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255; - * \n\n - * 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. - * \n\n - * Row order is top to bottom and row pixels are stored left to - * right. - * \n\n - * 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. - * \n\n - * 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. - * \n\n - * 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. - * \n\n - * 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. - * \n\n - * 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: - * \n\n - * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; - * - * - #EVAS_COLORSPACE_GRY8: - * . - * The image is just a alpha mask (8 bit's per pixel). This is used - * for alpha masking. - * - * Some examples on this group of functions can be found @ref - * Example_Evas_Images "here". - * - * @ingroup Evas_Object_Specific - */ - -/** - * @addtogroup Evas_Object_Image - * @{ - */ - -typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o); - - -/** - * Creates a new image object on the given Evas @p e canvas. - * - * @param e The given canvas. - * @return The created image object handle. - * - * @note If you intend to @b display an image somehow in a GUI, - * besides binding it to a real image file/source (with - * evas_object_image_file_set(), for example), you'll have to tell - * this image object how to fill its space with the pixels it can get - * from the source. See evas_object_image_filled_add(), for a helper - * on the common case of scaling up an image source to the whole area - * of the image object. - * - * @see evas_object_image_fill_set() - * - * Example: - * @code - * img = evas_object_image_add(canvas); - * evas_object_image_file_set(img, "/path/to/img", NULL); - * @endcode - */ -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 @b automatically scales its bound - * image to the object's area, on both axis. - * - * @param e The given canvas. - * @return The created image object handle. - * - * This is a helper function around evas_object_image_add() and - * evas_object_image_filled_set(). It has the same effect of applying - * those functions in sequence, which is a very common use case. - * - * @note Whenever this object gets resized, the bound image will be - * rescaled, too. - * - * @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); - -/** - * Set the source file from where an image object must fetch the real - * image data (it may be an Eet file, besides pure image ones). - * - * @param obj The given image object. - * @param file The image file path. - * @param key The image key in @p file (if its an Eet one), or @c - * NULL, otherwise. - * - * If the file supports multiple data stored in it (as Eet files do), - * you can specify the key to be used as the index of the image in - * this file. - * - * Example: - * @code - * img = evas_object_image_add(canvas); - * evas_object_image_file_set(img, "/path/to/img", NULL); - * err = evas_object_image_load_error_get(img); - * 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 - * { - * evas_object_image_fill_set(img, 0, 0, w, h); - * evas_object_resize(img, w, h); - * evas_object_show(img); - * } - * @endcode - */ -EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); - -/** - * Retrieve the source file from where an image object is to fetch the - * real image data (it may be an Eet file, besides pure image ones). - * - * @param obj The given image object. - * @param file Location to store the image file path. - * @param key Location to store the image key (if @p file is an Eet - * one). - * - * You must @b not modify the strings on the returned pointers. - * - * @note Use @c NULL pointers on the file components you're not - * interested in: they'll be ignored by the function. - */ -EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2); - -/** - * Set the dimensions for an image object's border, a region which @b - * won't ever be scaled together with its center. - * - * @param obj The given image object. - * @param l The border's left width. - * @param r The border's right width. - * @param t The border's top width. - * @param b The border's bottom width. - * - * When Evas is rendering, an image source may be scaled to fit the - * size of its image object. This function sets an area from the - * borders of the image inwards which is @b not to be scaled. This - * function is useful for making frames and for widget theming, where, - * for example, buttons may be of varying sizes, but their border size - * must remain constant. - * - * The units used for @p l, @p r, @p t and @p b are canvas units. - * - * @note The border region itself @b may be scaled by the - * evas_object_image_border_scale_set() function. - * - * @note By default, image objects have no borders set, i. e. @c l, @c - * r, @c t and @c b start as @c 0. - * - * See the following figures for visual explanation:\n - * @htmlonly - * - * Full-size - * @endhtmlonly - * @image rtf image-borders.png - * @image latex image-borders.eps width=\textwidth - * @htmlonly - * - * Full-size - * @endhtmlonly - * @image rtf border-effect.png - * @image latex border-effect.eps width=\textwidth - * - * @see evas_object_image_border_get() - * @see evas_object_image_border_center_fill_set() - */ -EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1); - -/** - * Retrieve the dimensions for an image object's border, a region - * which @b won't ever be scaled together with its center. - * - * @param obj The given image object. - * @param l Location to store the border's left width in. - * @param r Location to store the border's right width in. - * @param t Location to store the border's top width in. - * @param b Location to store the border's bottom width in. - * - * @note Use @c NULL pointers on the border components you're not - * interested in: they'll be ignored by the function. - * - * See @ref evas_object_image_border_set() for more details. - */ -EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); - -/** - * Sets @b how the center part of the given image object (not the - * borders) should be drawn when Evas is rendering it. - * - * @param obj The given image object. - * @param fill Fill mode of the center region of @p obj (a value in - * #Evas_Border_Fill_Mode). - * - * This function sets how the center part of the image object's source - * image is to be drawn, which must be one of the values in - * #Evas_Border_Fill_Mode. By center we mean the complementary part of - * that defined by evas_object_image_border_set(). This one is very - * useful for making frames and decorations. You would most probably - * also be using a filled image (as in evas_object_image_filled_set()) - * to use as a frame. - * - * @see evas_object_image_border_center_fill_get() - */ -EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1); - -/** - * Retrieves @b how the center part of the given image object (not the - * borders) is to be drawn when Evas is rendering it. - * - * @param obj The given image object. - * @return fill Fill mode of the center region of @p obj (a value in - * #Evas_Border_Fill_Mode). - * - * See @ref evas_object_image_fill_set() for more details. - */ -EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set whether the image object's fill property should track the - * object's size. - * - * @param obj The given image object. - * @param setting @c EINA_TRUE, to make the fill property follow - * object size or @c EINA_FALSE, otherwise - * - * If @p setting is @c EINA_TRUE, then every evas_object_resize() will - * @b automatically trigger a call to evas_object_image_fill_set() - * with the that new size (and @c 0, @c 0 as source image's origin), - * so the bound image will fill the whole object's area. - * - * @see evas_object_image_filled_add() - * @see evas_object_image_fill_get() - */ -EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); - -/** - * Retrieve whether the image object's fill property should track the - * object's size. - * - * @param obj The given image object. - * @return @c EINA_TRUE if it is tracking, @c EINA_FALSE, if not (and - * evas_object_fill_set() must be called manually). - * - * @see evas_object_image_filled_set() for more information - */ -EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Sets the scaling factor (multiplier) for the borders of an image - * object. - * - * @param obj The given image object. - * @param scale The scale factor (default is @c 1.0 - i.e. no scaling) - * - * @see evas_object_image_border_set() - * @see evas_object_image_border_scale_get() - */ -EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale); - -/** - * Retrieves the scaling factor (multiplier) for the borders of an - * image object. - * - * @param obj The given image object. - * @return The scale factor set for its borders - * - * @see evas_object_image_border_set() - * @see evas_object_image_border_scale_set() - */ -EAPI double evas_object_image_border_scale_get (const Evas_Object *obj); - -/** - * Set how to fill an image object's drawing rectangle given the - * (real) image bound to it. - * - * @param obj The given image object to operate on. - * @param x The x coordinate (from the top left corner of the bound - * image) to start drawing from. - * @param y The y coordinate (from the top left corner of the bound - * image) to start drawing from. - * @param w The width the bound image will be displayed at. - * @param h The height the bound image will be displayed at. - * - * Note that if @p w or @p h are smaller than the dimensions of - * @p obj, the displayed image will be @b tiled around the object's - * area. To have only one copy of the bound image drawn, @p x and @p y - * must be 0 and @p w and @p h need to be the exact width and height - * of the image object itself, respectively. - * - * See the following image to better understand the effects of this - * call. On this diagram, both image object and original image source - * have @c a x @c a dimensions and the image itself is a circle, with - * empty space around it: - * - * @image html image-fill.png - * @image rtf image-fill.png - * @image latex image-fill.eps - * - * @warning The default values for the fill parameters are @p x = 0, - * @p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the - * evas_object_image_filled_add() helper and want your image - * displayed, you'll have to set valid values with this function on - * your object. - * - * @note evas_object_image_filled_set() is a helper function which - * will @b override the values set here automatically, for you, in a - * given way. - */ -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); - -/** - * Retrieve how an image object is to fill its drawing rectangle, - * given the (real) image bound to it. - * - * @param obj The given image object. - * @param x Location to store the x coordinate (from the top left - * corner of the bound image) to start drawing from. - * @param y Location to store the y coordinate (from the top left - * corner of the bound image) to start drawing from. - * @param w Location to store the width the bound image is to be - * displayed at. - * @param h Location to store the height the bound image is to be - * displayed at. - * - * @note Use @c NULL pointers on the fill components you're not - * interested in: they'll be ignored by the function. - * - * See @ref evas_object_image_fill_set() for more details. - */ -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); - -/** - * Sets the size of the given image object. - * - * @param obj The given image object. - * @param w The new width of the image. - * @param h The new height of the image. - * - * 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. - */ -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. - * - * @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. - * - * See @ref evas_object_image_size_set() for more details. - */ -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. - * - * @param obj The given image object. - * @return The stride of the image (in bytes). - * - * The row stride is the number of bytes between the start of a row - * and the start of the next row for image data. - */ -EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieves a number representing any error that occurred during the - * last loading of the given image object's source image. - * - * @param obj The given image object. - * @return A value giving the last error that occurred. It should be - * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE - * is returned if there was no error. - */ -EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Sets the raw image data of the given image object. - * - * @param obj The given image object. - * @param data The raw data, or @c NULL. - * - * Note that the raw data must be of the same size (see - * evas_object_image_size_set(), which has to be called @b before this - * one) and colorspace (see evas_object_image_colorspace_set()) of the - * image. If data is @c NULL, the current image data will be - * freed. Naturally, if one does not set an image object's data - * manually, it will still have one, allocated by Evas. - * - * @see evas_object_image_data_get() - */ -EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); - -/** - * Get a pointer to the raw image data of the given image object. - * - * @param obj The given image object. - * @param for_writing Whether the data being retrieved will be - * modified (@c EINA_TRUE) or not (@c EINA_FALSE). - * @return The raw image data. - * - * 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. - * - * Each time you call this function on an image object, its data - * buffer will have an internal reference counter - * incremented. Decrement it back by using - * evas_object_image_data_set(). This is specially important for the - * directfb Evas engine. - * - * This is best suited for when you want to modify an existing image, - * without changing its dimensions. - * - * @note The contents' format returned by it depend on the color - * space of the given image object. - * - * @note You may want to use evas_object_image_data_update_add() to - * inform data changes, if you did any. - * - * @see evas_object_image_data_set() - */ -EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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); - -/** - * Replaces the raw image data of the given image object. - * - * @param obj The given image object. - * @param data The raw data to replace. - * - * This function lets the application replace an image object's - * internal pixel buffer with an 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. - * - */ -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. - * - * @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. - * - * This function schedules a particular rectangular region of an image - * object to be updated (redrawn) at the next rendering cycle. - */ -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 usage on the given image object. - * - * @param obj The given image object. - * @param has_alpha Whether to use alpha channel (@c EINA_TRUE) data - * or not (@c EINA_FALSE). - * - * This function sets a flag on an image object indicating whether or - * not to use alpha channel data. A value of @c EINA_TRUE makes it use - * alpha channel data, and @c EINA_FALSE makes it ignore that - * data. Note that this has nothing to do with an object's color as - * manipulated by evas_object_color_set(). - * - * @see evas_object_image_alpha_get() - */ -EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1); - -/** - * Retrieve whether alpha channel data is being used on the given - * image object. - * - * @param obj The given image object. - * @return Whether the alpha channel data is being used (@c EINA_TRUE) - * or not (@c EINA_FALSE). - * - * This function returns @c EINA_TRUE if the image object's alpha - * channel is being used, or @c EINA_FALSE 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); - -/** - * Sets whether to use high-quality image scaling algorithm on the - * given image object. - * - * @param obj The given image object. - * @param smooth_scale Whether to use smooth scale or not. - * - * When enabled, a higher quality image scaling algorithm is used when - * scaling images to sizes other than the source image's original - * one. This gives better results but is more computationally - * expensive. - * - * @note Image objects get created originally with smooth scaling @b - * on. - * - * @see evas_object_image_smooth_scale_get() - */ -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 high-quality - * image scaling algorithm. - * - * @param obj The given image object. - * @return Whether smooth scale is being used. - * - * See @ref evas_object_image_smooth_scale_set() for more details. - */ -EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Preload an image object's image data in the background - * - * @param obj The given image object. - * @param cancel @c EINA_FALSE will add it the preloading work queue, - * @c EINA_TRUE will remove it (if it was issued before). - * - * This function requests the preload of the data image in the - * background. The work is queued before being processed (because - * there might be other pending requests of this type). - * - * Whenever the image data gets loaded, Evas will call - * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what - * may be immediately, if the data was already preloaded before). - * - * Use @c EINA_TRUE for @p cancel on scenarios where you don't need - * the image data preloaded anymore. - * - * @note Any evas_object_show() call after evas_object_image_preload() - * will make the latter to be @b cancelled, with the loading process - * now taking place @b synchronously (and, thus, blocking the return - * of the former until the image is loaded). It is highly advisable, - * then, that the user preload an image with it being @b hidden, just - * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback. - */ -EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1); - -/** - * Reload an image object's image data. - * - * @param obj The given image object pointer. - * - * This function reloads the image data bound to image object @p obj. - */ -EAPI void evas_object_image_reload (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Save the given image object's contents to an (image) file. - * - * @param obj The given image object. - * @param file The filename to be used to save the image (extension - * obligatory). - * @param key The image key in the file (if an Eet one), or @c NULL, - * otherwise. - * @param flags String containing the flags to be used (@c NULL for - * none). - * - * The extension suffix on @p file will determine which saver - * module Evas is to use when saving, thus the final file's - * format. If the file supports multiple data stored in it (Eet ones), - * you can specify the key to be used as the index of the image in it. - * - * You can specify some flags when saving the image. Currently - * acceptable flags are @c quality and @c compress. Eg.: @c - * "quality=100 compress=9" - */ -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 canvas' 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); - -/** - * Set the DPI resolution of an image object's source image. - * - * @param obj The given canvas pointer. - * @param dpi The new DPI resolution. - * - * This function sets the DPI resolution of a given loaded canvas - * image. Most useful for the SVG image loader. - * - * @see evas_object_image_load_dpi_get() - */ -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 object in the canvas. - * - * @param obj The given canvas pointer. - * @return The DPI resolution of the given canvas image. - * - * This function returns the DPI resolution of the given canvas image. - * - * @see evas_object_image_load_dpi_set() for more details - */ -EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the size of a given image object's source image, when loading - * it. - * - * @param obj The given canvas object. - * @param w The new width of the image's load size. - * @param h The new height of the image's load size. - * - * This function sets a new (loading) size for the given canvas - * image. - * - * @see evas_object_image_load_size_get() - */ -EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1); - -/** - * Get the size of a given image object's source image, when loading - * it. - * - * @param obj The given image object. - * @param w Where to store the new width of the image's load size. - * @param h Where to store the new height of the image's load size. - * - * @note Use @c NULL pointers on the size components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_image_load_size_set() for more details - */ -EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); - -/** - * Set the scale down factor of a given image object's source image, - * when loading it. - * - * @param obj The given image object pointer. - * @param scale_down The scale down factor. - * - * This function sets the scale down factor of a given canvas - * image. Most useful for the SVG image loader. - * - * @see evas_object_image_load_scale_down_get() - */ -EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1); - -/** - * get the scale down factor of a given image object's source image, - * when loading it. - * - * @param obj The given image object pointer. - * - * @see evas_object_image_load_scale_down_set() for more details - */ -EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Inform a given image object to load a selective region of its - * source image. - * - * @param obj The given image object pointer. - * @param x X-offset of the region to be loaded. - * @param y Y-offset of the region to be loaded. - * @param w Width of the region to be loaded. - * @param h Height of the region to be loaded. - * - * This function is useful when one is not showing all of an image's - * area on its image object. - * - * @note The image loader for the image format in question has to - * support selective region loading in order to this function to take - * effect. - * - * @see evas_object_image_load_region_get() - */ -EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - -/** - * Retrieve the coordinates of a given image object's selective - * (source image) load region. - * - * @param obj The given image object pointer. - * @param x Where to store the X-offset of the region to be loaded. - * @param y Where to store the Y-offset of the region to be loaded. - * @param w Where to store the width of the region to be loaded. - * @param h Where to store the height of the region to be loaded. - * - * @note Use @c NULL pointers on the coordinates you're not interested - * in: they'll be ignored by the function. - * - * @see evas_object_image_load_region_get() - */ -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); - -/** - * Get the support state of a given image - * - * @param obj The given image object pointer - * @return The region support state - * @since 1.2.0 - * - * This function returns the state of the region support of given image - */ -EAPI Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the native surface of a given image of the canvas - * - * @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); - -/** - * Set the video surface linked to a given image of the canvas - * - * @param obj The given canvas pointer. - * @param surf The new video surface. - * @since 1.1.0 - * - * This function link a video surface to a given canvas image. - * - */ -EAPI void evas_object_image_video_surface_set (Evas_Object *obj, Evas_Video_Surface *surf) EINA_ARG_NONNULL(1); - -/** - * Get the video surface linekd to a given image of the canvas - * - * @param obj The given canvas pointer. - * @return The video surface of the given canvas image. - * @since 1.1.0 - * - * This function returns the video surface linked to a given canvas image. - * - */ -EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the scale hint of a given image of the canvas. - * - * @param obj The given image object pointer. - * @param hint The scale hint, a value in - * #Evas_Image_Scale_Hint. - * - * This function sets the scale hint value of the given image object - * in the canvas, which will affect how Evas is to cache scaled - * versions of its original source image. - * - * @see evas_object_image_scale_hint_get() - */ -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 image object pointer. - * @return The scale hint value set on @p obj, a value in - * #Evas_Image_Scale_Hint. - * - * This function returns the scale hint value of the given image - * object of the canvas. - * - * @see evas_object_image_scale_hint_set() for more details. - */ -EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the content hint setting of a given image object of the canvas. - * - * @param obj The given canvas pointer. - * @param hint The content hint value, one of the - * #Evas_Image_Content_Hint ones. - * - * This function sets the content hint value of the given image of the - * canvas. For example, if you're on the GL engine and your driver - * implementation supports it, setting this hint to - * #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need @b zero copies - * at texture upload time, which is an "expensive" operation. - * - * @see evas_object_image_content_hint_get() - */ -EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); - -/** - * Get the content hint setting of a given image object of the canvas. - * - * @param obj The given canvas pointer. - * @return hint The content hint value set on it, one of the - * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means - * an error). - * - * This function returns the content hint value of the given image of - * the canvas. - * - * @see evas_object_image_content_hint_set() - */ -EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * 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 an image object to used as a @b proxy. - * - * @param obj Proxy (image) object. - * @param src Source object to use for the proxy. - * @return @c EINA_TRUE on success, @c EINA_FALSE on error. - * - * If an image object is set to behave as a @b proxy, it will mirror - * the rendering contents of a given @b source object in its drawing - * region, without affecting that source in any way. The source must - * be another valid Evas object. Other effects may be applied to the - * proxy, such as a map (see evas_object_map_set()) to create a - * reflection of the original object (for example). - * - * Any existing source object on @p obj will be removed after this - * call. Setting @p src to @c NULL clears the proxy object (not in - * "proxy state" anymore). - * - * @warning You cannot set a proxy as another proxy's source. - * - * @see evas_object_image_source_get() - * @see evas_object_image_source_unset() - */ -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 object. - * - * @param obj Image object - * @return Source object (if any), or @c NULL, if not in "proxy mode" - * (or on errors). - * - * @see evas_object_image_source_set() for more details - */ -EAPI Evas_Object *evas_object_image_source_get (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Clear the source object on a proxy image object. - * - * @param obj Image object to clear source of. - * @return @c EINA_TRUE on success, @c EINA_FALSE on error. - * - * This is equivalent to calling evas_object_image_source_set() with a - * @c NULL source. - */ -EAPI Eina_Bool evas_object_image_source_unset (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Check if a file extension 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 extension 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 open 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); - -/** - * Check if an image object can be animated (have multiple frames) - * - * @param obj Image object - * @return whether obj support animation - * - * This returns if the image file of an image object is capable of animation - * such as an animated gif file might. This is only useful to be called once - * the image object file has been set. - * - * Example: - * @code - * extern Evas_Object *obj; - * - * if (evas_object_image_animated_get(obj)) - * { - * int frame_count; - * int loop_count; - * Evas_Image_Animated_Loop_Hint loop_type; - * double duration; - * - * frame_count = evas_object_image_animated_frame_count_get(obj); - * printf("This image has %d frames\n",frame_count); - * - * duration = evas_object_image_animated_frame_duration_get(obj,1,0); - * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n"); - * - * loop_count = evas_object_image_animated_loop_count_get(obj); - * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count); - * - * loop_type = evas_object_image_animated_loop_type_get(obj); - * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP) - * printf("You had better set frame like 1->2->3->1->2->3...\n"); - * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG) - * printf("You had better set frame like 1->2->3->2->1->2...\n"); - * else - * printf("Unknown loop type\n"); - * - * evas_object_image_animated_frame_set(obj,1); - * printf("You set image object's frame to 1. You can see frame 1\n"); - * } - * @endcode - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj); - -/** - * Get the total number of frames of the image object. - * - * @param obj Image object - * @return The number of frames - * - * This returns total number of frames the image object supports (if animated) - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj); - -/** - * Get the kind of looping the image object does. - * - * @param obj Image object - * @return Loop type of the image object - * - * This returns the kind of looping the image object wants to do. - * - * If it returns EVAS_IMAGE_ANIMATED_HINT_LOOP, you should display frames in a sequence like: - * 1->2->3->1->2->3->1... - * If it returns EVAS_IMAGE_ANIMATED_HINT_PINGPONG, it is better to - * display frames in a sequence like: 1->2->3->2->1->2->3->1... - * - * The default type is EVAS_IMAGE_ANIMATED_HINT_LOOP. - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj); - -/** - * Get the number times the animation of the object loops. - * - * @param obj Image object - * @return The number of loop of an animated image object - * - * This returns loop count of image. The loop count is the number of times - * the animation will play fully from first to last frame until the animation - * should stop (at the final frame). - * - * If 0 is returned, then looping should happen indefinitely (no limit to - * the number of times it loops). - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj); - -/** - * Get the duration of a sequence of frames. - * - * @param obj Image object - * @param start_frame The first frame - * @param fram_num Number of frames in the sequence - * - * This returns total duration that the specified sequence of frames should - * take in seconds. - * - * If you set start_frame to 1 and frame_num 0, you get frame 1's duration - * If you set start_frame to 1 and frame_num 1, you get frame 1's duration + - * frame2's duration - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int fram_num); - -/** - * Set the frame to current frame of an image object - * - * @param obj The given image object. - * @param frame_num The index of current frame - * - * This set image object's current frame to frame_num with 1 being the first - * frame. - * - * @see evas_object_image_animated_get() - * @see evas_object_image_animated_frame_count_get() - * @see evas_object_image_animated_loop_type_get() - * @see evas_object_image_animated_loop_count_get() - * @see evas_object_image_animated_frame_duration_get() - * @see evas_object_image_animated_frame_set() - * @since 1.1.0 - */ -EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_num); -/** - * @} - */ - -/** - * @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. - * - * See some @ref Example_Evas_Text "examples" on this group of functions. - * - * @ingroup Evas_Object_Specific - */ - -/** - * @addtogroup Evas_Object_Text - * @{ - */ - -/* basic styles (4 bits allocated use 0->10 now, 5 left) */ -#define EVAS_TEXT_STYLE_MASK_BASIC 0xf - -/** - * Text style type creation macro. Use style types on the 's' - * arguments, being 'x' your style variable. - */ -#define EVAS_TEXT_STYLE_BASIC_SET(x, s) \ - do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0) - -#define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4) - -/** - * Text style type creation macro. This one will impose shadow - * directions on the style type variable -- use the @c - * EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incrementally. - */ -#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \ - do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0) - - typedef enum _Evas_Text_Style_Type - { - EVAS_TEXT_STYLE_PLAIN, /**< plain, standard text */ - EVAS_TEXT_STYLE_SHADOW, /**< text with shadow underneath */ - EVAS_TEXT_STYLE_OUTLINE, /**< text with an outline */ - EVAS_TEXT_STYLE_SOFT_OUTLINE, /**< text with a soft outline */ - EVAS_TEXT_STYLE_GLOW, /**< text with a glow effect */ - EVAS_TEXT_STYLE_OUTLINE_SHADOW, /**< text with both outline and shadow effects */ - EVAS_TEXT_STYLE_FAR_SHADOW, /**< text with (far) shadow underneath */ - EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW, /**< text with outline and soft shadow effects combined */ - EVAS_TEXT_STYLE_SOFT_SHADOW, /**< text with (soft) shadow underneath */ - EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, /**< text with (far soft) shadow underneath */ - - /* OR these to modify shadow direction (3 bits needed) */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< shadow growing to bottom right */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< shadow growing to the bottom */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< shadow growing to bottom left */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< shadow growing to the left */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< shadow growing to top left */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< shadow growing to the top */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< shadow growing to top right */ - EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< shadow growing to the right */ - } Evas_Text_Style_Type; /**< Types of styles to be applied on text objects. The @c EVAS_TEXT_STYLE_SHADOW_DIRECTION_* ones are to be ORed together with others imposing shadow, to change shadow's direction */ - -/** - * Creates a new text object on the provided canvas. - * - * @param e The canvas to create the text object on. - * @return @c NULL on error, a pointer to a new text object on - * success. - * - * Text objects are for simple, single line text elements. If you want - * more elaborated text blocks, see @ref Evas_Object_Textblock. - * - * @see evas_object_text_font_source_set() - * @see evas_object_text_font_set() - * @see evas_object_text_text_set() - */ -EAPI Evas_Object *evas_object_text_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * Set the font (source) file to be used on a given text object. - * - * @param obj The text object to set font for. - * @param font The font file's path. - * - * This function allows the font file to be explicitly set for a given - * text object, overriding system lookup, which will first occur in - * the given file's contents. - * - * @see evas_object_text_font_get() - */ -EAPI void evas_object_text_font_source_set (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1); - -/** - * Get the font file's path which is being used on a given text - * object. - * - * @param obj The text object to set font for. - * @param font The font file's path. - * - * @see evas_object_text_font_get() for more details - */ -EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the font family and size on a given text object. - * - * @param obj The text object to set font for. - * @param font The font (family) name. - * @param size The font size, in points. - * - * This function allows the font name and size of a text object to be - * set. The @p font string has to follow fontconfig's convention on - * naming fonts, as it's the underlying library used to query system - * fonts by Evas (see the @c fc-list command's output, on your system, - * to get an idea). - * - * @see evas_object_text_font_get() - * @see evas_object_text_font_source_set() - */ - EAPI void evas_object_text_font_set (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1); - -/** - * Retrieve the font family and size in use on a given text object. - * - * @param obj The evas text object to query for font information. - * @param font A pointer to the location to store the font name in. - * @param size A pointer to the location to store the font size in. - * - * This function allows the font name and size of a text object to be - * queried. Be aware that the font name string is still owned by Evas - * and should @b not have free() called on it by the caller of the - * function. - * - * @see evas_object_text_font_set() - */ -EAPI void evas_object_text_font_get (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1); - -/** - * Sets the text string to be displayed by the given text object. - * - * @param obj The text object to set text string on. - * @param text Text string to display on it. - * - * @see evas_object_text_text_get() - */ -EAPI void evas_object_text_text_set (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); - -/** - * Retrieves the text string currently being displayed by the given - * text object. - * - * @param obj The given text object. - * @return The text string currently being displayed on it. - * - * @note Do not free() the return value. - * - * @see evas_object_text_text_set() - */ -EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @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); - - EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Retrieve position and dimension information of a character within a text @c Evas_Object. - * - * 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 success, EINA_TRUE on error. - */ -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); - -/** - * Retrieves the style on use on the given text object. - * - * @param obj the given text object to set style on. - * @return the style type in use. - * - * @see evas_object_text_style_set() for more details. - */ -EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Sets the style to apply on the given text object. - * - * @param obj the given text object to set style on. - * @param type a style type. - * - * Text object styles are one of the values in - * #Evas_Text_Style_Type. Some of those values are combinations of - * more than one style, and some account for the direction of the - * rendering of shadow effects. - * - * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and - * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value. - * - * The following figure illustrates the text styles: - * - * @image html text-styles.png - * @image rtf text-styles.png - * @image latex text-styles.eps - * - * @see evas_object_text_style_get() - * @see evas_object_text_shadow_color_set() - * @see evas_object_text_outline_color_set() - * @see evas_object_text_glow_color_set() - * @see evas_object_text_glow2_color_set() - */ -EAPI void evas_object_text_style_set (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1); - -/** - * Sets the shadow color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * Shadow effects, which are fading colors decorating the text - * underneath it, will just be shown if the object is set to one of - * the following styles: - * - * - #EVAS_TEXT_STYLE_SHADOW - * - #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 - * - * One can also change the direction where the shadow grows to, with - * evas_object_text_style_set(). - * - * @see evas_object_text_shadow_color_get() - */ -EAPI void evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the shadow color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @note Use @c NULL pointers on the color components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_text_shadow_color_set() for more details. - */ -EAPI void evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the glow color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * Glow effects, which are glowing colors decorating the text's - * surroundings, will just be shown if the object is set to the - * #EVAS_TEXT_STYLE_GLOW style. - * - * @note Glow effects are placed from a short distance of the text - * itself, but no touching it. For glowing effects right on the - * borders of the glyphs, see 'glow 2' effects - * (evas_object_text_glow2_color_set()). - * - * @see evas_object_text_glow_color_get() - */ -EAPI void evas_object_text_glow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the glow color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @note Use @c NULL pointers on the color components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_text_glow_color_set() for more details. - */ -EAPI void evas_object_text_glow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the 'glow 2' color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * 'Glow 2' effects, which are glowing colors decorating the text's - * (immediate) surroundings, will just be shown if the object is set - * to the #EVAS_TEXT_STYLE_GLOW style. See also - * evas_object_text_glow_color_set(). - * - * @see evas_object_text_glow2_color_get() - */ -EAPI void evas_object_text_glow2_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the 'glow 2' color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @note Use @c NULL pointers on the color components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_text_glow2_color_set() for more details. - */ -EAPI void evas_object_text_glow2_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); - -/** - * Sets the outline color for the given text object. - * - * @param obj The given Evas text object. - * @param r The red component of the given color. - * @param g The green component of the given color. - * @param b The blue component of the given color. - * @param a The alpha component of the given color. - * - * Outline effects (colored lines around text glyphs) will just be - * shown if the object is set to one of the following styles: - * - #EVAS_TEXT_STYLE_OUTLINE - * - #EVAS_TEXT_STYLE_SOFT_OUTLINE - * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW - * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW - * - * @see evas_object_text_outline_color_get() - */ -EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); - -/** - * Retrieves the outline color for the given text object. - * - * @param obj The given Evas text object. - * @param r Pointer to variable to hold the red component of the given - * color. - * @param g Pointer to variable to hold the green component of the - * given color. - * @param b Pointer to variable to hold the blue component of the - * given color. - * @param a Pointer to variable to hold the alpha component of the - * given color. - * - * @note Use @c NULL pointers on the color components you're not - * interested in: they'll be ignored by the function. - * - * @see evas_object_text_outline_color_set() for more details. - */ -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. - * - * @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 contact me 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. - * - * You can use markup to format text, for example: "Big!". - * You can also put more than one style directive in one tag: - * "Big and Red!". - * Please notice that we used "" although the format also included - * color, this is because the first format determines the matching closing tag's - * name. You can also use anonymous tags, like: "Big" which - * just pop any type of format, but it's advised to use the named alternatives - * instead. - * - * @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) 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 "" 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 "" 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 - * Textblock supports various format directives that can be used either in - * markup, or by calling @ref evas_object_textblock_format_append or - * @ref evas_object_textblock_format_prepend. In addition to the mentioned - * format directives, textblock allows creating additional format directives - * using "tags" that can be set in the style see @ref evas_textblock_style_set . - * - * Textblock supports the following formats: - * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold". - * @li font_weight - Overrides the weight defined in "font". E.g: "font_weight=Bold" is the same as "font=:style=Bold". Supported weights: "normal", "thin", "ultralight", "light", "book", "medium", "semibold", "bold", "ultrabold", "black", and "extrablack". - * @li font_style - Overrides the style defined in "font". E.g: "font_style=Italic" is the same as "font=:style=Italic". Supported styles: "normal", "oblique", and "italic". - * @li font_width - Overrides the width defined in "font". E.g: "font_width=Condensed" is the same as "font=:style=Condensed". Supported widths: "normal", "ultracondensed", "extracondensed", "condensed", "semicondensed", "semiexpanded", "expanded", "extraexpanded", and "ultraexpanded". - * @li lang - Overrides the language defined in "font". E.g: "lang=he" is the same as "font=:lang=he". - * @li font_fallbacks - A comma delimited list of fonts to try if finding the main font fails. - * @li font_size - The font size in points. - * @li font_source - The source of the font, e.g an eet file. - * @li color - Text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li underline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li underline2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li outline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li shadow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li glow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li glow2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li backing_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li strikethrough_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". - * @li align - Either "auto" (meaning according to text direction), "left", "right", "center", "middle", a value between 0.0 and 1.0, or a value between 0% to 100%. - * @li valign - Either "top", "bottom", "middle", "center", "baseline", "base", a value between 0.0 and 1.0, or a value between 0% to 100%. - * @li wrap - "word", "char", "mixed", or "none". - * @li left_margin - Either "reset", or a pixel value indicating the margin. - * @li right_margin - Either "reset", or a pixel value indicating the margin. - * @li underline - "on", "off", "single", or "double". - * @li strikethrough - "on" or "off" - * @li backing - "on" or "off" - * @li style - Either "off", "none", "plain", "shadow", "outline", "soft_outline", "outline_shadow", "outline_soft_shadow", "glow", "far_shadow", "soft_shadow", or "far_soft_shadow". - * @li tabstops - Pixel value for tab width. - * @li linesize - Force a line size in pixels. - * @li linerelsize - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. - * @li linegap - Force a line gap in pixels. - * @li linerelgap - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. - * @li item - Creates an empty space that should be filled by an upper layer. Use "size", "abssize", or "relsize". To define the items size, and an optional: vsize=full/ascent to define the item's position in the line. - * @li linefill - Either a float value or percentage indicating how much to fill the line. - * @li ellipsis - Value between 0.0-1.0 to indicate the type of ellipsis, or -1.0 to indicate ellipsis isn't wanted. - * @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off. - * - * - * @todo put here some usage examples - * - * @ingroup Evas_Object_Specific - * - * @{ - */ - - 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); - -/** - * Returns the escaped version of the string. - * @param string to escape - * @param len_ret the len of the part of the string that was used. - * @return the escaped string. - */ -EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * 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); - -/** - * Return the plain version of the markup. - * - * Works as if you set the markup to a textblock and then retrieve the plain - * version of the text. i.e:
and <\n> will be replaced with \n, &...; with - * the actual char and etc. - * - * @param obj the textblock object to work with. (if NULL, tries the default) - * @param text the markup text (if NULL, return NULL) - * @return an allocated plain text version of the markup - * @since 1.2.0 - */ -EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; - -/** - * Return the markup version of the plain text. - * - * Replaces \n ->
\t -> and etc. Generally needed before you pass - * plain text to be set in a textblock. - * - * @param obj the textblock object to work with (if NULL, it just does the - * default behaviour, i.e with no extra object information). - * @param text the markup text (if NULL, return NULL) - * @return an allocated plain text version of the markup - * @since 1.2.0 - */ -EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; - -/** - * Creates a new textblock style. - * @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); - - -/** - * 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); - -/** - * Push ts to the top of the user style stack. - * - * FIXME: API is solid but currently only supports 1 style in the stack. - * - * The user style overrides the corresponding elements of the regular style. - * This is the proper way to do theme overrides in code. - * @param obj the Evas object to set the style to. - * @param ts the style to set. - * @return Returns no value. - * @see evas_object_textblock_style_set - * @since 1.2.0 - */ -EAPI void evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); - -/** - * Del the from the top of the user style stack. - * - * @param obj the object to get the style from. - * @see evas_object_textblock_style_get - * @since 1.2.0 - */ -EAPI void evas_object_textblock_style_user_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Get (don't remove) the style at the top of the user style stack. - * - * @param obj the object to get the style from. - * @return the style of the object. - * @see evas_object_textblock_style_get - * @since 1.2.0 - */ -EAPI const Evas_Textblock_Style *evas_object_textblock_style_user_peek(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @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); - -/** - * @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 alignment 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 legacy mode, EINA_FALSE otherwise. - * @since 1.1.0 - */ -EAPI void evas_object_textblock_legacy_newline_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 legacy mode, EINA_FALSE otherwise. - * @since 1.1.0 - */ -EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * 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 Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Create a new cursor, associate it to the obj and init it to point - * 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(const 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 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 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 pair. - * Assumes the node is the first part of 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. - * @deprecated duplicate of evas_textblock_cursor_at_format_set - */ -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 *fnode) 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); - -/** - * 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); - -/** - * Moves the cursor to the start of the word under the cursor. - * - * @param cur the cursor to move. - * @return #EINA_TRUE on success #EINA_FALSE otherwise. - * @since 1.2.0 - */ -EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); - -/** - * Moves the cursor to the end of the word under the cursor. - * - * @param cur the cursor to move. - * @return #EINA_TRUE on success #EINA_FALSE otherwise. - * @since 1.2.0 - */ -EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); - -/** - * Go to the first char in the node the cursor is pointing on. - * - * @param cur the cursor to update. - * @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); - -/** - * 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); - -/** - * 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
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
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); - -/** - * 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); - -/** - * Return the currently visible range. - * - * @param start the start of the range. - * @param end the end of the range. - * @return EINA_TRUE on success. EINA_FALSE otherwise. - * @since 1.1.0 - */ -EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); - -/** - * Return the format nodes in the range between cur1 and cur2. - * - * @param cur1 one side of the range. - * @param cur2 the other side of the range - * @return the foramt nodes in the range. You have to free it. - * @since 1.1.0 - */ -EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); - -/** - * Return the text in the range between cur1 and cur2 - * - * @param cur1 one side of the range. - * @param cur2 the other side of the range - * @param format The form on which to return the text. Markup - in textblock markup. Plain - UTF8. - * @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); - -/** - * Return the content of the cursor. - * - * Free the returned string pointer when done (if it is not NULL). - * - * @param cur the cursor - * @return the text in the range, terminated by a nul byte (may be utf8). - */ -EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - - -/** - * 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 variable. - * 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); - 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); - - -/** - * 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); -/** - * @} - */ - -/* @since 1.2.0 */ -EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame); - -/* @since 1.2.0 */ -EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj); - -/** - * @defgroup Evas_Smart_Group Smart Functions - * - * Functions that deal with #Evas_Smart structs, 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 a couple of existent smart - * objects in Evas itself (see @ref Evas_Object_Box, @ref - * Evas_Object_Table and @ref Evas_Smart_Object_Clipped). - * - * See also some @ref Example_Evas_Smart_Objects "examples" of this - * group of functions. - */ - -/** - * @addtogroup Evas_Smart_Group - * @{ - */ - -/** - * @def EVAS_SMART_CLASS_VERSION - * - * The version you have to put into the version field in the - * #Evas_Smart_Class struct. Used to safeguard from binaries with old - * smart object intefaces running with newer ones. - * - * @ingroup Evas_Smart_Group - */ -#define EVAS_SMART_CLASS_VERSION 4 -/** - * @struct _Evas_Smart_Class - * - * A smart object's @b base class definition - * - * @ingroup Evas_Smart_Group - */ -struct _Evas_Smart_Class -{ - const char *name; /**< the name string of the class */ - int version; - void (*add) (Evas_Object *o); /**< code to be run when adding object to a canvas */ - void (*del) (Evas_Object *o); /**< code to be run when removing object to a canvas */ - void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); /**< code to be run when moving object on a canvas */ - void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); /**< code to be run when resizing object on a canvas */ - void (*show) (Evas_Object *o); /**< code to be run when showing object on a canvas */ - void (*hide) (Evas_Object *o); /**< code to be run when hiding object on a canvas */ - void (*color_set) (Evas_Object *o, int r, int g, int b, int a); /**< code to be run when setting color of object on a canvas */ - void (*clip_set) (Evas_Object *o, Evas_Object *clip); /**< code to be run when setting clipper of object on a canvas */ - void (*clip_unset) (Evas_Object *o); /**< code to be run when unsetting clipper of object on a canvas */ - void (*calculate) (Evas_Object *o); /**< code to be run when object has rendering updates on a canvas */ - void (*member_add) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is added to object */ - void (*member_del) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is removed from object */ - - const Evas_Smart_Class *parent; /**< this class inherits from this parent */ - const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, @c NULL terminated */ - void *interfaces; /**< to be used in a future near you */ - const void *data; -}; - -/** - * @struct _Evas_Smart_Cb_Description - * - * Describes a callback issued by a smart object - * (evas_object_smart_callback_call()), as defined in its smart object - * class. This is particularly useful to explain to end users and - * their code (i.e., introspection) what the parameter @c event_info - * will point to. - * - * @ingroup Evas_Smart_Group - */ -struct _Evas_Smart_Cb_Description -{ - const char *name; /**< callback name ("changed", for example) */ - - /** - * @brief Hint on the type of @c event_info parameter's contents on - * a #Evas_Smart_Cb callback. - * - * 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 in any way. 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 given Evas smart class. - * - * @param smart_name The name used for the smart class. e.g: - * @c "Evas_Object_Box". - * @param prefix Prefix used for all variables and functions defined - * and referenced by this macro. - * @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. - * - * This macro saves some typing when writing a smart class derived - * from another one. In order to work, the user @b must provide some - * functions adhering to the following guidelines: - * - @_smart_set_user(): the @b internal @c _smart_set - * function (defined by this macro) 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, both overrides and extensions, if any. - * - If this new class should be subclassable as well, a @b public @c - * _smart_set() function is desirable to fill in the class used as - * parent by the children. It's up to the user to provide this - * interface, which will most likely call @_smart_set() to - * get the job done. - * - * After the macro's usage, the following will be defined for use: - * - @_parent_sc: A pointer to the @b parent smart - * class. When calling parent functions from overloaded ones, use - * this global variable. - * - @_smart_class_new(): this function returns the - * #Evas_Smart needed to create smart objects with this class, - * which should be passed to evas_object_smart_add(). - * - * @warning @p smart_name has to be a pointer to a globally available - * string! The smart class created here will just have a pointer set - * to that, and all object instances will depend on it for smart class - * name lookup. - * - * @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, 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 @c .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 This is an idiom used when one calls the parent's @c. add() - * after the specialized code. Naturally, the parent's base smart data - * has to be contemplated as the specialized one's first member, for - * things to work. - * - * @param o Evas object passed to the @c .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 struct - * - * @param s the #Evas_Smart struct to free - * - * @warning If this smart handle was created using - * evas_smart_class_new(), the associated #Evas_Smart_Class will not - * be freed. - * - * @note If you're using the #EVAS_SMART_SUBCLASS_NEW schema to create your - * smart object, note that an #Evas_Smart handle will be shared amongst all - * instances of the given smart class, through a static variable. - * Evas will internally count references on #Evas_Smart handles and free them - * when they are not referenced anymore. Thus, this function is of no use - * for Evas users, most probably. - */ -EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1); - -/** - * Creates a new #Evas_Smart from a given #Evas_Smart_Class struct - * - * @param sc the smart class definition - * @return a new #Evas_Smart pointer - * - * #Evas_Smart handles are necessary to create new @b instances of - * smart objects belonging to the class described by @p sc. That - * handle will contain, besides the smart class interface definition, - * all its smart callbacks infrastructure set, too. - * - * @note If you are willing to subclass a given smart class to - * construct yours, consider using the #EVAS_SMART_SUBCLASS_NEW macro, - * which will make use of this function automatically for you. - */ -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 handle of an #Evas_Smart struct - * - * @param s a valid #Evas_Smart pointer - * @return the #Evas_Smart_Class in it - */ -EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - - -/** - * @brief Get the data pointer set on an #Evas_Smart struct - * - * @param s a valid #Evas_Smart handle - * - * This data pointer is set as the data field in the #Evas_Smart_Class - * passed in to evas_smart_class_new(). - */ -EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the smart callbacks known by this #Evas_Smart handle's smart - * class hierarchy. - * - * @param s A valid #Evas_Smart handle. - * @param[out] count Returns the number of elements in the returned - * array. - * @return The array with callback descriptions known by this smart - * class, with its size returned in @a count parameter. It - * should not be modified in any way. If no callbacks are - * known, @c NULL is returned. The array is sorted by event - * names and elements refer to the original values given to - * evas_smart_class_new()'s #Evas_Smart_Class::callbacks - * (pointer to them). - * - * This is likely different from - * evas_object_smart_callbacks_descriptions_get() as it will contain - * the callbacks of @b all this 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 @b references to - * original values given to evas_smart_class_new() as - * Evas_Smart_Class::callbacks. - * - * The array is sorted by Evas_Smart_Cb_Description::name. The last - * array element is a @c NULL pointer and is not accounted for in @a - * count. Loop iterations can check any of these size indicators. - * - * @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 a callback description for the callback named @a name. - * - * @param s The #Evas_Smart where to search for class registered smart - * event callbacks. - * @param name Name of the desired callback, which must @b not be @c - * NULL. The search has 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 A reference to the description if found, or @c NULL, otherwise - * - * @see evas_smart_callbacks_descriptions_get() - */ -EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2); - - -/** - * 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, (Evas_Smart_Class *)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 object API could be - * used on the icon object. - * - * Besides that, generally smart objects implement a specific - * API, so that users interact with its own custom features. The - * API takes form of explicit exported functions one may call and - * smart callbacks. - * - * @section Evas_Smart_Object_Group_Callbacks Smart events and callbacks - * - * Smart objects can elect events (smart events, from now on) occurring - * inside of them to be reported back to their users via callback - * functions (smart callbacks). This way, you can extend Evas' own - * object events. They are defined by an event string, which - * identifies them uniquely. There's also a function prototype - * definition for the callback functions: #Evas_Smart_Cb. - * - * When defining an #Evas_Smart_Class, smart object implementors are - * strongly encouraged to properly set the Evas_Smart_Class::callbacks - * callbacks description array, so that the users of the smart object - * can have introspection on its events API at run time. - * - * See some @ref Example_Evas_Smart_Objects "examples" of this group - * of functions. - * - * @see @ref Evas_Smart_Group for class definitions. - */ - -/** - * @addtogroup Evas_Smart_Object_Group - * @{ - */ - -/** - * Instantiates a new smart object described by @p s. - * - * @param e the canvas on which to add the object - * @param s the #Evas_Smart describing the smart object - * @return a new #Evas_Object handle - * - * This is the function one should use when defining the public - * function @b adding an instance of the new smart object to a given - * canvas. It will take care of setting all of its internals to work - * as they should, if the user set things properly, as seem on the - * #EVAS_SMART_SUBCLASS_NEW, for example. - * - * @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 given smart object. - * - * @param obj The member object - * @param smart_obj The smart object - * - * Members will automatically be stacked and layered together with the - * smart object. The various stacking functions will operate on - * members relative to the other members instead of the entire canvas, - * since they now live on an exclusive layer (see - * evas_object_stack_above(), for more details). - * - * Any @p smart_obj object's specific implementation of the @c - * member_add() smart function will take place too, naturally. - * - * @see evas_object_smart_member_del() - * @see evas_object_smart_members_get() - * - * @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 given smart object. - * - * @param obj the member object - * @ingroup Evas_Smart_Object_Group - * - * This removes a member object from a smart object, if it was added - * to any. The object will still be on the canvas, but no longer - * associated with whichever smart object it was associated with. - * - * @see evas_object_smart_member_add() for more details - * @see evas_object_smart_members_get() - */ -EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Retrieves the list of the member objects of a given Evas smart - * object - * - * @param obj the smart object to get members from - * @return Returns the list of the member objects of @p obj. - * - * The returned list should be freed with @c eina_list_free() when you - * no longer need it. - * - * @see evas_object_smart_member_add() - * @see evas_object_smart_member_del() -*/ -EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Gets the parent smart object of a given Evas object, if it has one. - * - * @param obj the Evas object you want to get the parent smart object - * from - * @return Returns the parent smart object of @a obj or @c NULL, if @a - * obj is not a smart member of any - * - * @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); - -/** - * Checks whether a given smart object or any of its smart object - * parents is of a given smart class. - * - * @param obj An Evas smart object to check the type of - * @param type The @b name (type) of the smart class to check for - * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a - * type, @c EINA_FALSE otherwise - * - * If @p obj is not a smart object, this call will fail - * immediately. Otherwise, make sure evas_smart_class_inherit() or its - * sibling functions were used correctly when creating the smart - * object's class, so it has a valid @b parent smart class pointer - * set. - * - * The checks use smart classes names and string - * comparison. There is a version of this same check using - * pointer comparison, since a smart class' name is a single - * string in Evas. - * - * @see evas_object_smart_type_check_ptr() - * @see #EVAS_SMART_SUBCLASS_NEW - * - * @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); - -/** - * Checks whether a given smart object or any of its smart object - * parents is of a given smart class, using pointer comparison. - * - * @param obj An Evas smart object to check the type of - * @param type The type (name string) to check for. Must be the name - * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a - * type, @c EINA_FALSE otherwise - * - * @see evas_object_smart_type_check() for more details - * - * @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); - -/** - * Get the #Evas_Smart from which @p obj smart object was created. - * - * @param obj a smart object - * @return the #Evas_Smart handle or @c NULL, on errors - * - * @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); - -/** - * Retrieve user data stored on a given smart object. - * - * @param obj The smart object's handle - * @return A pointer to data stored using - * evas_object_smart_data_set(), or @c NULL, if none has been - * set. - * - * @see evas_object_smart_data_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); - -/** - * Store a pointer to user data for a given smart object. - * - * @param obj The smart object's handle - * @param data A pointer to user data - * - * This data is stored @b independently of the one set by - * evas_object_data_set(), naturally. - * - * @see evas_object_smart_data_get() - * - * @ingroup Evas_Smart_Object_Group - */ -EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); - -/** - * Add (register) a callback function to the smart event specified by - * @p event on the smart object @p obj. - * - * @param obj a smart object - * @param event the event's name string - * @param func the callback function - * @param data user data to be passed to the callback function - * - * Smart callbacks look very similar to Evas callbacks, but are - * implemented as smart object's custom ones. - * - * This function adds a function callback to an smart object when the - * event named @p event occurs in it. 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. - * - * A smart callback function must have the ::Evas_Smart_Cb prototype - * definition. The first parameter (@p data) in this definition will - * have the same value passed to evas_object_smart_callback_add() as - * the @p data parameter, at runtime. The second parameter @p obj is a - * handle to the object on which the event occurred. The third - * parameter, @p event_info, is a pointer to data which is totally - * dependent on the smart object's implementation and semantic for the - * given event. - * - * There is an infrastructure for introspection on smart objects' - * events (see evas_smart_callbacks_descriptions_get()), but no - * internal smart objects on Evas implement them yet. - * - * @see @ref Evas_Smart_Object_Group_Callbacks for more details. - * - * @see evas_object_smart_callback_del() - * @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); - -/** - * Add (register) a callback function to the smart event specified by - * @p event on the smart object @p obj. Except for the priority field, - * it's exactly the same as @ref evas_object_smart_callback_add - * - * @param obj a smart object - * @param event the event's name string - * @param priority The priority of the callback, lower values called first. - * @param func the callback function - * @param data user data to be passed to the callback function - * - * @see evas_object_smart_callback_add - * @since 1.1.0 - * @ingroup Evas_Smart_Object_Group - */ -EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data); - -/** - * Delete (unregister) a callback function from the smart event - * specified by @p event on the smart object @p obj. - * - * @param obj a smart object - * @param event the event's name string - * @param func the callback function - * @return the data pointer - * - * This function removes the first added smart callback on the - * object @p obj matching the event name @p event and the registered - * function pointer @p func. If the removal is successful it will also - * return the data pointer that was passed to - * evas_object_smart_callback_add() (that will be the same as the - * parameter) when the callback(s) was(were) added to the canvas. If - * not successful @c NULL will be returned. - * - * @see evas_object_smart_callback_add() for more details. - * - * @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); - -/** - * Delete (unregister) a callback function from the smart event - * specified by @p event on the smart object @p obj. - * - * @param obj a smart object - * @param event the event's name string - * @param func the callback function - * @param data the data pointer that was passed to the callback - * @return the data pointer - * - * This function removes the first added smart callback on the - * object @p obj matching the event name @p event, the registered - * function pointer @p func and the callback data pointer @p data. If - * the removal is successful it will also return the data pointer that - * was passed to evas_object_smart_callback_add() (that will be the same - * as the parameter) when the callback(s) was(were) added to the canvas. - * If not successful @c NULL will be returned. A common use would be to - * remove an exact match of a callback - * - * @see evas_object_smart_callback_add() for more details. - * @since 1.2.0 - * @ingroup Evas_Smart_Object_Group - * - * @note To delete all smart event callbacks which match @p type and @p func, - * use evas_object_smart_callback_del(). - */ -EAPI void *evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); - -/** - * Call a given smart callback on the smart object @p obj. - * - * @param obj the smart object - * @param event the event's name string - * @param event_info pointer to an event specific struct or information to - * pass to the callback functions registered on this smart event - * - * This should be called @b internally, from the smart object's own - * code, when some specific event has occurred and the implementor - * wants is to pertain to the object's events API (see @ref - * Evas_Smart_Object_Group_Callbacks). The documentation for the smart - * object should include a list of possible events and what type of @p - * event_info to expect for each of them. Also, when defining an - * #Evas_Smart_Class, smart object implementors are strongly - * encouraged to properly set the Evas_Smart_Class::callbacks - * callbacks description array, so that the users of the smart object - * can have introspection on its events API at run time. - * - * @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 an smart object @b instance's smart callbacks descriptions. - * - * @param obj A smart object - * @param descriptions @c NULL terminated array with - * #Evas_Smart_Cb_Description descriptions. Array elements won't be - * modified at run time, but references to them and their contents - * will be made, so this array should be kept alive during the whole - * object's lifetime. - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. - * - * 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 respective possibly registered in the smart object - * @b class. Both are kept in different arrays and users of - * evas_object_smart_callbacks_descriptions_get() should handle this - * case as they wish. - * - * @note Becase @p descriptions must be @c NULL terminated, and - * because a @c NULL name makes little sense, too, - * Evas_Smart_Cb_Description::name must @b not be @c NULL. - * - * @note While instance callbacks descriptions are possible, they are - * @b not recommended. Use @b class callbacks descriptions - * instead as they make you smart object user's life simpler and - * will use less memory, as descriptions and arrays will be - * shared among all instances. - * - * @ingroup Evas_Smart_Object_Group - */ -EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1); - -/** - * Retrieve an smart object's know smart callback descriptions (both - * instance and class ones). - * - * @param obj The smart object to get callback descriptions from. - * @param class_descriptions Where to store class callbacks - * descriptions array, if any is known. If no descriptions are - * known, @c NULL is returned - * @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. - * @param instance_count Returns how many instance callbacks - * descriptions are known. - * - * This call searches for registered callback descriptions for both - * instance and class of the given smart object. These arrays will be - * sorted by Evas_Smart_Cb_Description::name and also @c NULL - * terminated, so both @a class_count and @a instance_count can be - * ignored, if the caller wishes so. The terminator @c NULL is not - * counted in these values. - * - * @note If just class descriptions are of interest, try - * evas_smart_callbacks_descriptions_get() instead. - * - * @note Use @c NULL pointers on the descriptions/counters you're not - * interested in: they'll be ignored by the function. - * - * @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. - * - * @param obj The given Evas smart object - * - * This will flag the given object as needing recalculation, - * forcefully. As an effect, on the next rendering cycle it's @b - * calculate() (see #Evas_Smart_Class) smart function will be called. - * - * @see evas_object_smart_need_recalculate_set(). - * @see evas_object_smart_calculate(). - * - * @ingroup Evas_Smart_Object_Group - */ -EAPI void evas_object_smart_changed (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Set or unset the flag signalling that a given smart object needs to - * get recalculated. - * - * @param obj the smart object - * @param value whether one wants to set (@c EINA_TRUE) or to unset - * (@c EINA_FALSE) the flag. - * - * If this flag is set, then the @c calculate() smart function of @p - * obj will be called, if one is provided, during rendering phase of - * Evas (see evas_render()), after which this flag will be - * automatically unset. - * - * If that smart function is not provided for the given object, this - * flag will be left unchanged. - * - * @note just setting this flag will not make the canvas' whole scene - * dirty, by itself, and evas_render() will have no effect. To - * force that, use evas_object_smart_changed(), that will also - * automatically call this function automatically, with @c - * EINA_TRUE as parameter. - * - * @see evas_object_smart_need_recalculate_get() - * @see evas_object_smart_calculate() - * @see evas_smart_objects_calculate() - * - * @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 value of the flag signalling that a given smart object needs to - * get recalculated. - * - * @param obj the smart object - * @return if flag is set or not. - * - * @note this flag will be unset during the rendering phase, when the - * @c calculate() smart function is called, if one is provided. - * If it's not provided, then the flag will be left unchanged - * after the rendering phase. - * - * @see evas_object_smart_need_recalculate_set(), for more details - * - * @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); - -/** - * Call the @b calculate() smart function immediately on a given smart - * object. - * - * @param obj the smart object's handle - * - * This will force immediate calculations (see #Evas_Smart_Class) - * needed for renderization of this object and, besides, unset the - * flag on it telling it needs recalculation for the next rendering - * phase. - * - * @see evas_object_smart_need_recalculate_set() - * - * @ingroup Evas_Smart_Object_Group - */ -EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1); - -/** - * Call user-provided @c calculate() smart functions and unset the - * flag signalling that the object needs to get recalculated to @b all - * smart objects in the canvas. - * - * @param e The canvas to calculate all smart objects in - * - * @see evas_object_smart_need_recalculate_set() - * - * @ingroup Evas_Smart_Object_Group - */ -EAPI void evas_smart_objects_calculate (Evas *e); - -/** - * This gets the internal counter that counts the number of smart calculations - * - * @param e The canvas to get the calculate counter from - * - * Whenever evas performs smart object calculations on the whole canvas - * it increments a counter by 1. This is the smart object calculate counter - * that this function returns the value of. It starts at the value of 0 and - * will increase (and eventually wrap around to negative values and so on) by - * 1 every time objects are calculated. You can use this counter to ensure - * you don't re-do calculations withint the same calculation generation/run - * if the calculations maybe cause self-feeding effects. - * - * @ingroup Evas_Smart_Object_Group - * @since 1.1 - */ -EAPI int evas_smart_objects_calculate_count_get (const Evas *e); - -/** - * Moves all children objects of a given smart object relative to a - * given offset. - * - * @param obj the smart object. - * @param dx horizontal offset (delta). - * @param dy vertical offset (delta). - * - * This will make each of @p obj object's children to move, from where - * they before, with those delta values (offsets) on both directions. - * - * @note This is most useful on custom smart @c move() functions. - * - * @note Clipped smart objects already make use of this function on - * their @c move() smart function definition. - */ -EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1); - -/** - * @} - */ - -/** - * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object - * - * Clipped smart object is a base to construct other smart objects - * based on the concept of having an internal clipper that is applied - * to all children objects. 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 some @ref Example_Evas_Smart_Objects "examples" of this group - * of functions. - * - * @see evas_object_smart_clipped_smart_set() - * - * @ingroup Evas_Smart_Object_Group - */ - -/** - * @addtogroup Evas_Smart_Object_Clipped - * @{ - */ - -/** - * 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 associated clipper - * from. - * @return the clipper object. - * - * Use this function if you want to change any of this clipper's - * properties, like colors. - * - * @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); - -/** - * Set a given smart class' callbacks so it implements the clipped smart - * object"'s interface. - * - * @param sc The smart class handle to operate on - * - * This call will assign all the required methods of the @p sc - * #Evas_Smart_Class instance to the implementations set for clipped - * smart objects. If one wants to "subclass" it, call this function - * and then override desired values. If one wants to call any 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 ≻ - * } - * @endcode - * - * Default behavior for each of #Evas_Smart_Class functions on a - * clipped smart object are: - * - @c add: creates a hidden clipper with "infinite" size, to clip - * any incoming members; - * - @c del: delete all children objects; - * - @c move: move all objects relative relatively; - * - @c resize: not defined; - * - @c show: if there are children objects, show clipper; - * - @c hide: hides clipper; - * - @c color_set: set the color of clipper; - * - @c clip_set: set clipper of clipper; - * - @c clip_unset: unset the clipper of clipper; - * - * @note There are other means of assigning parent smart classes to - * child ones, like the #EVAS_SMART_SUBCLASS_NEW macro or the - * evas_smart_class_inherit_full() function. - */ -EAPI void evas_object_smart_clipped_smart_set (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1); - -/** - * Get a pointer to the clipped smart object's class, to use - * for proper inheritance - * - * @see #Evas_Smart_Object_Clipped for more information on this smart - * class - */ -EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get (void) EINA_CONST; - -/** - * @} - */ - -/** - * @defgroup Evas_Object_Box Box Smart Object - * - * A box is a convenience smart object that packs children inside it - * in @b sequence, using a layouting function specified by the - * user. There are a couple of pre-made layouting functions built-in - * in Evas, all of them using children size hints to define their - * size and alignment inside their cell space. - * - * Examples on this smart object's usage: - * - @ref Example_Evas_Box - * - @ref Example_Evas_Size_Hints - * - * @see @ref Evas_Object_Group_Size_Hints - * - * @ingroup Evas_Smart_Object_Group - */ - -/** - * @addtogroup Evas_Object_Box - * @{ - */ - -/** - * @typedef Evas_Object_Box_Api - * - * Smart class extension, providing extra box object requirements. - * - * @ingroup Evas_Object_Box - */ - typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api; - -/** - * @typedef Evas_Object_Box_Data - * - * Smart object instance data, providing box object 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. Box options are a way of - * extending box items properties, which will be taken into account - * for layouting decisions. The box layouting functions provided by - * Evas will only rely on objects' canonical size hints to layout - * them, so the basic box option has @b no (custom) property set. - * - * Users creating their own layouts, but not depending on extra child - * items' properties, would be fine just using - * evas_object_box_layout_set(). But if one desires a layout depending - * on extra child properties, he/she has to @b subclass the box smart - * object. Thus, by using evas_object_box_smart_class_get() and - * evas_object_box_smart_set(), the @c option_new() and @c - * option_free() smart class functions should be properly - * redefined/extended. - * - * Object properties are bound to an integer identifier and must have - * a name string. Their values are open to any data. See the API on - * option properties for more details. - * - * @ingroup Evas_Object_Box - */ - typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option; - -/** - * @typedef Evas_Object_Box_Layout - * - * Function signature for an Evas box object layouting routine. By - * @a o it will be passed the box object in question, by @a priv it will - * be passed the box's internal data and, by @a user_data, it will be - * passed any custom data one could have set to a given box layouting - * function, with evas_object_box_layout_set(). - * - * @ingroup Evas_Object_Box - */ - typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data); - -/** - * @def EVAS_OBJECT_BOX_API_VERSION - * - * Current version for Evas box object smart class, a value which goes - * to _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 smart class inheriting from - * the box's one, to provide custom box behavior which could not be - * achieved 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; /**< Base smart class struct, need for all smart objects */ - int version; /**< Version of this smart class definition */ - Evas_Object_Box_Option *(*append) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to append child elements in boxes */ - Evas_Object_Box_Option *(*prepend) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to prepend child elements in boxes */ - Evas_Object_Box_Option *(*insert_before) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element before another in boxes */ - Evas_Object_Box_Option *(*insert_after) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element after another in boxes */ - Evas_Object_Box_Option *(*insert_at) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos); /**< Smart function to insert a child element at a given position on boxes */ - Evas_Object *(*remove) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to remove a child element from boxes */ - Evas_Object *(*remove_at) (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos); /**< Smart function to remove a child element from boxes, by its position */ - Eina_Bool (*property_set) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to set a custom property on a box child */ - Eina_Bool (*property_get) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to retrieve a custom property from a box child */ - const char *(*property_name_get)(Evas_Object *o, int property); /**< Smart function to get the name of a custom property of box children */ - int (*property_id_get) (Evas_Object *o, const char *name); /**< Smart function to get the numerical ID of a custom property of box children */ - Evas_Object_Box_Option *(*option_new) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to create a new box option struct */ - void (*option_free) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt); /**< Smart function to delete a box option struct */ - }; - -/** - * @def EVAS_OBJECT_BOX_API_INIT - * - * Initializer for a whole #Evas_Object_Box_Api structure, with - * @c NULL values on its specific fields. - * - * @param smart_class_init initializer to use for the "base" field - * (#Evas_Smart_Class). - * - * @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 - */ -#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_OBJECT_BOX_API_INIT_NULL - * - * Initializer to zero out a whole #Evas_Object_Box_Api structure. - * - * @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_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) - -/** - * @def EVAS_OBJECT_BOX_API_INIT_VERSION - * - * Initializer to zero out a whole #Evas_Object_Box_Api structure and - * set a specific version on it. - * - * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will set - * the version field of #Evas_Smart_Class (base field) to the latest - * #EVAS_SMART_CLASS_VERSION. - * - * @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_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) - -/** - * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION - * - * Initializer to zero out a whole #Evas_Object_Box_Api structure and - * set its name and version. - * - * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will also - * set the version field of #Evas_Smart_Class (base field) to the - * latest #EVAS_SMART_CLASS_VERSION and name it to the specific value. - * - * It will keep a reference to the name field as a "const char *", - * i.e., the name must be available while the structure is - * used (hint: static or global variable!) and must not be modified. - * - * @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_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) - -/** - * @struct _Evas_Object_Box_Data - * - * 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. - * - * @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; /**< Pointer to the box child object, itself */ - Eina_Bool max_reached:1; - Eina_Bool min_reached:1; - Evas_Coord alloc_size; - }; /**< #Evas_Object_Box_Option struct fields */ - -/** - * Set the default box @a api struct (Evas_Object_Box_Api) - * with the default values. May be used to extend that API. - * - * @param api The box API struct to set back, most probably with - * overridden fields (on class extensions scenarios) - */ -EAPI void evas_object_box_smart_set (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1); - -/** - * Get the Evas box smart class, for inheritance purposes. - * - * @return the (canonical) Evas box smart class. - * - * The returned value is @b not to be modified, just use it as your - * parent class. - */ -EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get (void) EINA_CONST; - -/** - * Set a new layouting function to a given box object - * - * @param o The box object to operate on. - * @param cb The new layout function to set on @p o. - * @param data Data pointer to be passed to @p cb. - * @param free_data Function to free @p data, if need be. - * - * A box layout function affects how a box object displays child - * elements within its area. The list of pre-defined box layouts - * available in Evas is: - * - evas_object_box_layout_horizontal() - * - evas_object_box_layout_vertical() - * - evas_object_box_layout_homogeneous_horizontal() - * - evas_object_box_layout_homogeneous_vertical() - * - evas_object_box_layout_homogeneous_max_size_horizontal() - * - evas_object_box_layout_homogeneous_max_size_vertical() - * - evas_object_box_layout_flow_horizontal() - * - evas_object_box_layout_flow_vertical() - * - evas_object_box_layout_stack() - * - * Refer to each of their documentation texts for details on them. - * - * @note A box layouting function will be triggered by the @c - * 'calculate' smart callback of the box's smart class. - */ -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); - -/** - * Add a new box object on the provided canvas. - * - * @param evas The canvas to create the box object on. - * @return @c NULL on error, a pointer to a new box object on - * success. - * - * After instantiation, if a box object hasn't its layout function - * set, via evas_object_box_layout_set(), it will have it by default - * set to evas_object_box_layout_horizontal(). The remaining - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * Add a new box as a @b child of a given smart object. - * - * @param parent The parent smart object to put the new box in. - * @return @c NULL on error, a pointer to a new box object on - * success. - * - * This is a helper function that has the same effect of putting a new - * box object into @p parent by use of evas_object_smart_member_add(). - * - * @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 - * - * @param o The box object in question - * @param priv The smart data of the @p o - * @param data The data pointer passed on - * evas_object_box_layout_set(), if any - * - * In this layout, the box object's overall behavior is controlled by - * its padding/alignment properties, which are set by the - * evas_object_box_{h,v}_{align,padding}_set() family of - * functions. The size hints of the elements in the box -- set by the - * 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 @c 0.0, children are - * aligned to the left. A value of @c 1.0 makes 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 - * their container's width, the children will be displayed out of the - * box's bounds. A negative value of @c align_h makes the box to - * @b 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 - * @b don't contribute to its behaviour when this layout is chosen. - * - * \par Child element's properties: - * @c align_x does @b 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/alignment 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 @b not pre-defined. If the container can't - * accommodate all its children, it sets the widths of the ones - * 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 childrens' (which have weights) - * widths as to fit the remaining space. The @c weight_x property, - * besides telling the element is resizable, gives a @b weight for the - * resizing process. The parent box will try to distribute (or take - * off) widths accordingly to the @b normalized list of weigths: most - * weighted children remain/get larger in this process than 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, those size hints 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 - * - * 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 @b homogeneous - * vertical 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) EINA_ARG_NONNULL(1, 2); - -/** - * Layout function which sets the box @a o to a @b homogeneous - * horizontal box - * - * @param o The box object in question - * @param priv The smart data of the @p o - * @param data The data pointer passed on - * evas_object_box_layout_set(), if any - * - * In a homogeneous horizontal box, its width is divided @b equally - * between the contained objects. The box's overall behavior is - * controlled by its padding/alignment properties, which are set by - * the evas_object_box_{h,v}_{align,padding}_set() family of - * functions. The size hints the elements in the box -- set by the - * 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 (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 (@r 0.0 to - * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to - * @c align_x makes the box try to resize this child element to the exact - * width of its cell (respecting the minimum and maximum size hints on - * the child's width and accounting for its horizontal padding - * hints). The child's @c padding_t, @c padding_b and @c align_y - * properties apply for padding/alignment relative to the overall - * height of the box. A value of @c -1.0 to @c align_y makes the box - * try to resize this child element to the exact height of its parent - * (respecting the maximum size 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 maximum size, - * homogeneous horizontal box - * - * @param o The box object in question - * @param priv The smart data of the @p o - * @param data The data pointer passed on - * evas_object_box_layout_set(), if any - * - * In a maximum size, homogeneous horizontal box, besides having cells - * of equal size reserved for the child objects, this size will - * be defined by the size of the @b largest child in the box (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 size hints of the elements in the box -- set by the - * 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 @c 0.0, children are aligned to the - * left. A value of @c 1.0 lets them aligned to the right - * border. Values in between align them proportionally. A negative - * value of @c align_h makes the box to @b 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 (@c 0.0 to - * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to - * @c align_x makes the box try to resize this child element to the exact - * width of its cell (respecting the minimum and maximum size hints on - * the child's width and accounting for its horizontal padding - * hints). The child's @c padding_t, @c padding_b and @c align_y - * properties apply for padding/alignment relative to the overall - * height of the box. A value of @c -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 maximum size, - * homogeneous vertical 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 @b flow horizontal - * box. - * - * @param o The box object in question - * @param priv The smart data of the @p o - * @param data The data pointer passed on - * evas_object_box_layout_set(), if any - * - * In a flow horizontal box, the box's child elements are placed in - * @b 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 size hints of the elements in the box -- set by the - * 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 (@c 0.0 to left align them, @c 1.0 - * to right align). A value of @c -1.0 to @c align_h lets the rows - * @b justified horizontally. @c align_v controls the vertical alignment - * of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A - * value of @c -1.0 to @c align_v makes the box to @b 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 @b flow vertical 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 a @b stacking box - * - * @param o The box object in question - * @param priv The smart data of the @p o - * @param data The data pointer passed on - * evas_object_box_layout_set(), if any - * - * In a stacking box, all children will be given the same size -- the - * box's own size -- and they will be stacked one above the other, so - * that the first object in @p o's internal list of child elements - * will be the bottommost in the stack. - * - * \par Box's properties: - * No box properties are 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 (@c 0.0 to - * extreme left, @c 1.0 to extreme right). A value of @c -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 for its horizontal padding properties). The - * same applies to the 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, for a - * given box object. - * - * @param o The given box object to set alignment from - * @param horizontal The horizontal alignment, in pixels - * @param vertical the vertical alignment, in pixels - * - * This will influence how a box object is to align its bounding box - * of contents within its own area. The values @b must be in the range - * @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal - * alignment, @c 0.0 means to the left, with @c 1.0 meaning to the - * right. For vertical alignment, @c 0.0 means to the top, with @c 1.0 - * meaning to the bottom. - * - * @note The default values for both alignments is @c 0.5. - * - * @see evas_object_box_align_get() - */ -EAPI void evas_object_box_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1); - -/** - * Get the alignment of the whole bounding box of contents, for a - * given box object. - * - * @param o The given box object to get alignment from - * @param horizontal Pointer to a variable where to store the - * horizontal alignment - * @param vertical Pointer to a variable where to store the vertical - * alignment - * - * @see evas_object_box_align_set() for more information - */ -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 set for a given box object. - * - * @param o The given box object to set padding from - * @param horizontal The horizontal padding, in pixels - * @param vertical the vertical padding, in pixels - * - * @note The default values for both padding components is @c 0. - * - * @see evas_object_box_padding_get() - */ -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 set for a given box object. - * - * @param o The given box object to get padding from - * @param horizontal Pointer to a variable where to store the - * horizontal padding - * @param vertical Pointer to a variable where to store the vertical - * padding - * - * @see evas_object_box_padding_set() - */ -EAPI void evas_object_box_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); - -/** - * Append a new @a child object to the given box object @a o. - * - * @param o The given box object - * @param child A child Evas object to be made a member of @p o - * @return A box option bound to the recently added box item or @c - * NULL, on errors - * - * On success, the @c "child,added" smart event will take place. - * - * @note The actual placing of the item relative to @p o's area will - * depend on the layout set to it. For example, on horizontal layouts - * an item in the end of the box's list of children will appear on its - * right. - * - * @note This call will trigger the box's _Evas_Object_Box_Api::append - * smart function. - */ -EAPI Evas_Object_Box_Option *evas_object_box_append (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); - -/** - * Prepend a new @a child object to the given box object @a o. - * - * @param o The given box object - * @param child A child Evas object to be made a member of @p o - * @return A box option bound to the recently added box item or @c - * NULL, on errors - * - * On success, the @c "child,added" smart event will take place. - * - * @note The actual placing of the item relative to @p o's area will - * depend on the layout set to it. For example, on horizontal layouts - * an item in the beginning of the box's list of children will appear - * on its left. - * - * @note This call will trigger the box's - * _Evas_Object_Box_Api::prepend smart function. - */ -EAPI Evas_Object_Box_Option *evas_object_box_prepend (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); - -/** - * Insert a new @a child object before another existing one, in - * a given box object @a o. - * - * @param o The given box object - * @param child A child Evas object to be made a member of @p o - * @param reference The child object to place this new one before - * @return A box option bound to the recently added box item or @c - * NULL, on errors - * - * On success, the @c "child,added" smart event will take place. - * - * @note This function will fail if @p reference is not a member of @p - * o. - * - * @note The actual placing of the item relative to @p o's area will - * depend on the layout set to it. - * - * @note This call will trigger the box's - * _Evas_Object_Box_Api::insert_before smart function. - */ -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); - -/** - * Insert a new @a child object after another existing one, in - * a given box object @a o. - * - * @param o The given box object - * @param child A child Evas object to be made a member of @p o - * @param reference The child object to place this new one after - * @return A box option bound to the recently added box item or @c - * NULL, on errors - * - * On success, the @c "child,added" smart event will take place. - * - * @note This function will fail if @p reference is not a member of @p - * o. - * - * @note The actual placing of the item relative to @p o's area will - * depend on the layout set to it. - * - * @note This call will trigger the box's - * _Evas_Object_Box_Api::insert_after smart function. - */ -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 @a child object at a given position, in a given - * box object @a o. - * - * @param o The given box object - * @param child A child Evas object to be made a member of @p o - * @param pos The numeric position (starting from @c 0) to place the - * new child object at - * @return A box option bound to the recently added box item or @c - * NULL, on errors - * - * On success, the @c "child,added" smart event will take place. - * - * @note This function will fail if the given position is invalid, - * given @p o's internal list of elements. - * - * @note The actual placing of the item relative to @p o's area will - * depend on the layout set to it. - * - * @note This call will trigger the box's - * _Evas_Object_Box_Api::insert_at smart function. - */ -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 a given object from a box object, unparenting it again. - * - * @param o The box object to remove a child object from - * @param child The handle to the child object to be removed - * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise - * - * On removal, you'll get an unparented object again, just as it was - * before you inserted it in the box. The - * _Evas_Object_Box_Api::option_free box smart callback will be called - * automatically for you and, also, the @c "child,removed" smart event - * will take place. - * - * @note This call will trigger the box's _Evas_Object_Box_Api::remove - * smart function. - */ -EAPI Eina_Bool evas_object_box_remove (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); - -/** - * Remove an object, bound to a given position in a box object, - * unparenting it again. - * - * @param o The box object to remove a child object from - * @param in The numeric position (starting from @c 0) of the child - * object to be removed - * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise - * - * On removal, you'll get an unparented object again, just as it was - * before you inserted it in the box. The @c option_free() box smart - * callback will be called automatically for you and, also, the - * @c "child,removed" smart event will take place. - * - * @note This function will fail if the given position is invalid, - * given @p o's internal list of elements. - * - * @note This call will trigger the box's - * _Evas_Object_Box_Api::remove_at smart function. - */ -EAPI Eina_Bool evas_object_box_remove_at (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1); - -/** - * Remove @b all child objects from a box object, unparenting them - * again. - * - * @param o The box object to remove a child object from - * @param child The handle to the child object to be removed - * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise - * - * This has the same effect of calling evas_object_box_remove() on - * each of @p o's child objects, in sequence. If, and only if, all - * those calls succeed, so does this one. - */ -EAPI Eina_Bool evas_object_box_remove_all (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); - -/** - * Get an iterator to walk the list of children of a given box object. - * - * @param o The box to retrieve an items iterator from - * @return An iterator on @p o's child objects, on success, or @c NULL, - * on errors - * - * @note Do @b not remove or delete objects while walking the list. - */ -EAPI Eina_Iterator *evas_object_box_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * Get an accessor (a structure providing random items access) to the - * list of children of a given box object. - * - * @param o The box to retrieve an items iterator from - * @return An accessor on @p o's child objects, on success, or @c NULL, - * on errors - * - * @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 objects in a given box object. - * - * @param o The box to retrieve an items list from - * @return A list of @p o's child objects, on success, or @c NULL, - * on errors (or if it has no child objects) - * - * The returned list should be freed with @c eina_list_free() when you - * no longer need it. - * - * @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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * Get the name of the property of the child elements of the box @a o - * which have @a id as identifier - * - * @param o The box to search child options from - * @param id The numerical identifier of the option being searched, for - * its name - * @return The name of the given property or @c NULL, on errors. - * - * @note This call won't do anything for a canonical Evas box. Only - * users which have @b subclassed it, setting custom box items options - * (see #Evas_Object_Box_Option) on it, would benefit from this - * function. They'd have to implement it and set it to be the - * _Evas_Object_Box_Api::property_name_get smart class function of the - * box, which is originally set to @c NULL. - */ -EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the numerical identifier of the property of the child elements - * of the box @a o which have @a name as name string - * - * @param o The box to search child options from - * @param name The name string of the option being searched, for - * its ID - * @return The numerical ID of the given property or @c -1, on - * errors. - * - * @note This call won't do anything for a canonical Evas box. Only - * users which have @b subclassed it, setting custom box items options - * (see #Evas_Object_Box_Option) on it, would benefit from this - * function. They'd have to implement it and set it to be the - * _Evas_Object_Box_Api::property_id_get smart class function of the - * box, which is originally set to @c NULL. - */ -EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); - -/** - * Set a property value (by its given numerical identifier), on a - * given box child element - * - * @param o The box parenting the child element - * @param opt The box option structure bound to the child box element - * to set a property on - * @param id The numerical ID of the given property - * @param ... (List of) actual value(s) to be set for this - * property. It (they) @b must be of the same type the user has - * defined for it (them). - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. - * - * @note This call won't do anything for a canonical Evas box. Only - * users which have @b subclassed it, setting custom box items options - * (see #Evas_Object_Box_Option) on it, would benefit from this - * function. They'd have to implement it and set it to be the - * _Evas_Object_Box_Api::property_set smart class function of the box, - * which is originally set to @c NULL. - * - * @note This function will internally create a variable argument - * list, with the values passed after @p property, and call - * evas_object_box_option_property_vset() with this list and the same - * previous arguments. - */ -EAPI Eina_Bool evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); - -/** - * Set a property value (by its given numerical identifier), on a - * given box child element -- by a variable argument list - * - * @param o The box parenting the child element - * @param opt The box option structure bound to the child box element - * to set a property on - * @param id The numerical ID of the given property - * @param va_list The variable argument list implementing the value to - * be set for this property. It @b must be of the same type the user has - * defined for it. - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. - * - * This is a variable argument list variant of the - * evas_object_box_option_property_set(). See its documentation for - * more details. - */ -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); - -/** - * Get a property's value (by its given numerical identifier), on a - * given box child element - * - * @param o The box parenting the child element - * @param opt The box option structure bound to the child box element - * to get a property from - * @param id The numerical ID of the given property - * @param ... (List of) pointer(s) where to store the value(s) set for - * this property. It (they) @b must point to variable(s) of the same - * type the user has defined for it (them). - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. - * - * @note This call won't do anything for a canonical Evas box. Only - * users which have @b subclassed it, getting custom box items options - * (see #Evas_Object_Box_Option) on it, would benefit from this - * function. They'd have to implement it and get it to be the - * _Evas_Object_Box_Api::property_get smart class function of the - * box, which is originally get to @c NULL. - * - * @note This function will internally create a variable argument - * list, with the values passed after @p property, and call - * evas_object_box_option_property_vget() with this list and the same - * previous arguments. - */ -EAPI Eina_Bool evas_object_box_option_property_get (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); - -/** - * Get a property's value (by its given numerical identifier), on a - * given box child element -- by a variable argument list - * - * @param o The box parenting the child element - * @param opt The box option structure bound to the child box element - * to get a property from - * @param id The numerical ID of the given property - * @param va_list The variable argument list with pointers to where to - * store the values of this property. They @b must point to variables - * of the same type the user has defined for them. - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. - * - * This is a variable argument list variant of the - * evas_object_box_option_property_get(). See its documentation for - * more details. - */ -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_Object_Table Table Smart Object. - * - * Convenience smart object that packs children using a tabular - * layout using children size hints to define their size and - * alignment inside their cell space. - * - * @ref tutorial_table shows how to use this Evas_Object. - * - * @see @ref Evas_Object_Group_Size_Hints - * - * @ingroup Evas_Smart_Object_Group - * - * @{ - */ - -/** - * @brief Create a new table. - * - * @param evas Canvas in which table will be added. - */ -EAPI Evas_Object *evas_object_table_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * @brief 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; - -/** - * @brief 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. This is the default. - * - * @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 WIDTH / - * COLUMNS 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 expand mode, 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); - -/** - * 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) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set padding between cells. - */ -EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); - -/** - * Get padding between cells. - */ -EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); - -/** - * Set the alignment of the whole bounding box of contents. - */ -EAPI void evas_object_table_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_table_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); - -/** - * 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 - * top 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 *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); - -/** - * Gets the mirrored mode of the table. - * - * @param obj The table object. - * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise. - * @since 1.1.0 - * @see evas_object_table_mirrored_set() - */ -EAPI Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1); - -/** - * Get packing location of a child of table - * - * @param o The given table object. - * @param child The child object to add. - * @param col pointer to store relative-horizontal position to place child. - * @param row pointer to store relative-vertical position to place child. - * @param colspan pointer to store how many relative-horizontal position to use for this child. - * @param rowspan pointer to store how many relative-vertical position to use for this child. - * - * @return 1 on success, 0 on failure. - * @since 1.1.0 - */ -EAPI Eina_Bool evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan); - -/** - * Add a new child to a table object or set its current packing. - * - * @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) EINA_ARG_NONNULL(1, 2); - -/** - * 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) EINA_ARG_NONNULL(1, 2); - -/** - * 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) EINA_ARG_NONNULL(1); - -/** - * 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) 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; - -/** - * Get the child of the table at the given coordinates - * - * @note This does not take into account col/row spanning - */ -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 under a regular grid - * layout, using their virtual grid location and size to determine - * children's positions inside the grid object's area. - * - * @ingroup Evas_Smart_Object_Group - * @since 1.1.0 - */ - -/** - * @addtogroup Evas_Object_Grid - * @{ - */ - -/** - * 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 - */ -EAPI Evas_Object *evas_object_grid_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - -/** - * Create a grid that is child of a given element @a parent. - * - * @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 - * - * @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 - */ -EAPI void evas_object_grid_size_set (Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1); - -/** - * Get the current virtual resolution - * - * @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); - -/** - * 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. - * - * @param obj The grid object. - * @param mirrored the mirrored mode to set - * @since 1.1.0 - */ -EAPI void evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); - -/** - * 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); - -/** - * 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); - -/** - * Remove child from grid. - * - * @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. - * - * @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. - * - * @param o The given grid object. - * @param clear if true, it will delete just removed children. - * @since 1.1.0 - */ -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; - -/** - * 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 - * - * Evas has an (optional) module which provides client-server - * infrastructure to share bitmaps across multiple processes, - * saving data and processing power. - * - * Be warned that it @b doesn't work when threaded image - * preloading is enabled for Evas, though. - */ - typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats; - typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache; - typedef struct _Evas_Cserve_Image Evas_Cserve_Image; - typedef struct _Evas_Cserve_Config Evas_Cserve_Config; - -/** - * Statistics about the server that shares cached bitmaps. - * @ingroup Evas_Cserve - */ - struct _Evas_Cserve_Stats - { - int saved_memory; /**< current amount of saved memory, in bytes */ - int wasted_memory; /**< current amount of wasted memory, in bytes */ - int saved_memory_peak; /**< peak amount of saved memory, in bytes */ - int wasted_memory_peak; /**< peak amount of wasted memory, in bytes */ - double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */ - double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */ - }; - -/** - * A handle of a cache of images shared by a server. - * @ingroup Evas_Cserve - */ - struct _Evas_Cserve_Image_Cache - { - struct { - int mem_total; - int count; - } active, cached; - Eina_List *images; - }; - -/** - * A handle to an image shared by a server. - * @ingroup Evas_Cserve - */ - struct _Evas_Cserve_Image - { - const char *file, *key; - int w, h; - time_t file_mod_time; - time_t file_checked_time; - time_t cached_time; - int refcount; - int data_refcount; - int memory_footprint; - double head_load_time; - double data_load_time; - Eina_Bool alpha : 1; - Eina_Bool data_loaded : 1; - Eina_Bool active : 1; - Eina_Bool dead : 1; - Eina_Bool useless : 1; - }; - -/** - * Configuration that controls the server that shares cached bitmaps. - * @ingroup Evas_Cserve - */ - struct _Evas_Cserve_Config - { - int cache_max_usage; - int cache_item_timeout; - int cache_item_timeout_check; - }; - - -/** - * Retrieves if the system wants to share bitmaps using the server. - * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise. - * @ingroup Evas_Cserve - */ -EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT; - -/** - * Retrieves if the system is connected to the server used to share - * bitmaps. - * - * @return @c EINA_TRUE if it's connected, @c EINA_FALSE otherwise. - * @ingroup Evas_Cserve - */ -EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT; - -/** - * Retrieves statistics from a running bitmap sharing server. - * @param stats pointer to structure to fill with statistics about the - * bitmap cache server. - * - * @return @c EINA_TRUE if @p stats were filled with data, - * @c EINA_FALSE otherwise (when @p stats is untouched) - * @ingroup Evas_Cserve - */ -EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT; - -/** - * Completely discard/clean a given images cache, thus re-setting it. - * - * @param cache A handle to the given images cache. - */ -EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache); - -/** - * Retrieves the current configuration of the Evas image caching - * server. - * - * @param config where to store current image caching server's - * configuration. - * - * @return @c EINA_TRUE if @p config was filled with data, - * @c EINA_FALSE otherwise (when @p config is untouched) - * - * The fields of @p config will be altered to reflect the current - * configuration's values. - * - * @see evas_cserve_config_set() - * - * @ingroup Evas_Cserve - */ -EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; - -/** - * Changes the configurations of the Evas image caching server. - * - * @param config A bitmap cache configuration handle with fields set - * to desired configuration values. - * @return @c EINA_TRUE if @p config was successfully applied, - * @c EINA_FALSE otherwise. - * - * @see evas_cserve_config_get() - * - * @ingroup Evas_Cserve - */ -EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; - -/** - * Force the system to disconnect from the bitmap caching server. - * - * @ingroup Evas_Cserve - */ -EAPI void evas_cserve_disconnect (void); - -/** - * @defgroup Evas_Utils General Utilities - * - * Some functions that are handy but are not specific of canvas or - * objects. - */ - -/** - * 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, "Unknown error" 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): - * "No error on load" and "File (or file path) does - * not exist", respectively. See the full @ref - * Example_Evas_Images "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 */ - -/** - * 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 */ - -/** - * 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 rgb 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 */ - -/** - * 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); - -/** - * @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 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 (keyname argument). Those are - * platform dependent symbolic names for the keys. Sometimes - * you'll get the right keyname 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 keynames. - * - * 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); - -/** - * 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); - - -/** - * 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); - - -/** - * 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); - - -/** - * 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 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); - - -/** - * Requests @p keyname key events be directed to @p obj. - * - * @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 must be present to - * trigger the event. - * @param not_modifiers a mask of modifiers that must @b not be present - * to trigger the event. - * @param exclusive request that the @p obj is the only object - * receiving the @p keyname events. - * @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise. - * - * Key grabs allow one or more objects to receive key events for - * specific key strokes even if other objects have focus. Whenever a - * key is grabbed, only the objects grabbing it will get the events - * for the given keys. - * - * @p keyname is a platform dependent symbolic name for the key - * pressed (see @ref Evas_Keys for more information). - * - * @p modifiers and @p not_modifiers are bit masks of all the - * modifiers that must and mustn't, respectively, be pressed along - * with @p keyname key in order to trigger this new key - * grab. Modifiers can be things such as Shift and Ctrl as well as - * user defined types via evas_key_modifier_add(). Retrieve them with - * evas_key_modifier_mask_get() or use @c 0 for empty masks. - * - * @p exclusive will make the given object the only one permitted to - * grab the given key. If given @c EINA_TRUE, subsequent calls on this - * function with different @p obj arguments will fail, unless the key - * is ungrabbed again. - * - * Example code follows. - * @dontinclude evas-events.c - * @skip if (d.focus) - * @until else - * - * See the full example @ref Example_Evas_Events "here". - * - * @see evas_object_key_ungrab - * @see evas_object_focus_set - * @see evas_object_focus_get - * @see evas_focus_get - * @see evas_key_modifier_add - */ -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); - -/** - * Removes the grab on @p keyname key events by @p obj. - * - * @param obj the object that has an existing key grab. - * @param keyname the key the grab is set for. - * @param modifiers a mask of modifiers that must be present to - * trigger the event. - * @param not_modifiers a mask of modifiers that must not not be - * present to trigger the event. - * - * Removes a key grab on @p obj if @p keyname, @p modifiers, and @p - * not_modifiers match. - * - * Example code follows. - * @dontinclude evas-events.c - * @skip got here by key grabs - * @until } - * - * See the full example @ref Example_Evas_Events "here". - * - * @see evas_object_key_grab - * @see evas_object_focus_set - * @see evas_object_focus_get - * @see evas_focus_get - */ -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); - -/** - * @} - */ - -/** - * @defgroup Evas_Touch_Point_List Touch Point List Functions - * - * Functions to get information of touched points in the Evas. - * - * Evas maintains list of touched points on the canvas. Each point has - * its co-ordinates, id and state. You can get the number of touched - * points and information of each point using evas_touch_point_list - * functions. - * - * @ingroup Evas_Canvas - */ - -/** - * @addtogroup Evas_Touch_Point_List - * @{ - */ - -/** - * Get the number of touched point in the evas. - * - * @param e The pointer to the Evas canvas. - * @return The number of touched point on the evas. - * - * New touched point is added to the list whenever touching the evas - * and point is removed whenever removing touched point from the evas. - * - * Example: - * @code - * extern Evas *evas; - * int count; - * - * count = evas_touch_point_list_count(evas); - * printf("The count of touch points: %i\n", count); - * @endcode - * - * @see evas_touch_point_list_nth_xy_get() - * @see evas_touch_point_list_nth_id_get() - * @see evas_touch_point_list_nth_state_get() - */ -EAPI unsigned int evas_touch_point_list_count(Evas *e) EINA_ARG_NONNULL(1); - -/** - * This function returns the nth touch point's co-ordinates. - * - * @param e The pointer to the Evas canvas. - * @param n The number of the touched point (0 being the first). - * @param x The pointer to a Evas_Coord to be filled in. - * @param y The pointer to a Evas_Coord to be filled in. - * - * Touch point's co-ordinates is updated whenever moving that point - * on the canvas. - * - * Example: - * @code - * extern Evas *evas; - * Evas_Coord x, y; - * - * if (evas_touch_point_list_count(evas)) - * { - * evas_touch_point_nth_xy_get(evas, 0, &x, &y); - * printf("The first touch point's co-ordinate: (%i, %i)\n", x, y); - * } - * @endcode - * - * @see evas_touch_point_list_count() - * @see evas_touch_point_list_nth_id_get() - * @see evas_touch_point_list_nth_state_get() - */ -EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); - -/** - * This function returns the @p id of nth touch point. - * - * @param e The pointer to the Evas canvas. - * @param n The number of the touched point (0 being the first). - * @return id of nth touch point, if the call succeeded, -1 otherwise. - * - * The point which comes from Mouse Event has @p id 0 and The point - * which comes from Multi Event has @p id that is same as Multi - * Event's device id. - * - * Example: - * @code - * extern Evas *evas; - * int id; - * - * if (evas_touch_point_list_count(evas)) - * { - * id = evas_touch_point_nth_id_get(evas, 0); - * printf("The first touch point's id: %i\n", id); - * } - * @endcode - * - * @see evas_touch_point_list_count() - * @see evas_touch_point_list_nth_xy_get() - * @see evas_touch_point_list_nth_state_get() - */ -EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); - -/** - * This function returns the @p state of nth touch point. - * - * @param e The pointer to the Evas canvas. - * @param n The number of the touched point (0 being the first). - * @return @p state of nth touch point, if the call succeeded, - * EVAS_TOUCH_POINT_CANCEL otherwise. - * - * The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed, - * EVAS_TOUCH_POINT_STILL when the point is not moved after pressed, - * EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and - * EVAS_TOUCH_POINT_UP when released. - * - * Example: - * @code - * extern Evas *evas; - * Evas_Touch_Point_State state; - * - * if (evas_touch_point_list_count(evas)) - * { - * state = evas_touch_point_nth_state_get(evas, 0); - * printf("The first touch point's state: %i\n", state); - * } - * @endcode - * - * @see evas_touch_point_list_count() - * @see evas_touch_point_list_nth_xy_get() - * @see evas_touch_point_list_nth_id_get() - */ -EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libraries/evas/src/lib/Evas_GL.h b/libraries/evas/src/lib/Evas_GL.h deleted file mode 100644 index 76937eb..0000000 --- a/libraries/evas/src/lib/Evas_GL.h +++ /dev/null @@ -1,1438 +0,0 @@ -#ifndef _EVAS_GL_H -#define _EVAS_GL_H - -#include -//#include - -#ifdef __cplusplus -extern "C" { -#endif - -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 struct _Evas_GL_API Evas_GL_API; -typedef void *Evas_GL_Func; -typedef void *EvasGLImage; - -typedef enum _Evas_GL_Color_Format -{ - EVAS_GL_RGB_888 = 0, - EVAS_GL_RGBA_8888 = 1 -} Evas_GL_Color_Format; - -typedef enum _Evas_GL_Depth_Bits -{ - EVAS_GL_DEPTH_NONE = 0, - EVAS_GL_DEPTH_BIT_8 = 1, - EVAS_GL_DEPTH_BIT_16 = 2, - EVAS_GL_DEPTH_BIT_24 = 3, - EVAS_GL_DEPTH_BIT_32 = 4 -} Evas_GL_Depth_Bits; - -typedef enum _Evas_GL_Stencil_Bits -{ - EVAS_GL_STENCIL_NONE = 0, - EVAS_GL_STENCIL_BIT_1 = 1, - EVAS_GL_STENCIL_BIT_2 = 2, - EVAS_GL_STENCIL_BIT_4 = 3, - EVAS_GL_STENCIL_BIT_8 = 4, - EVAS_GL_STENCIL_BIT_16 = 5 -} Evas_GL_Stencil_Bits; - -typedef enum _Evas_GL_Options_Bits -{ - EVAS_GL_OPTIONS_NONE = 0, - EVAS_GL_OPTIONS_DIRECT = (1<<0) -} Evas_GL_Options_Bits; - -struct _Evas_GL_Config -{ - Evas_GL_Color_Format color_format; - Evas_GL_Depth_Bits depth_bits; - Evas_GL_Stencil_Bits stencil_bits; - Evas_GL_Options_Bits options_bits; -}; - -#define EVAS_GL_EXTENSIONS 1 - - -/** - * @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 -#include -#include -#include - -// GL related data here.. -typedef struct _GLData -{ - Evas_GL_Context *ctx; - Evas_GL_Surface *sfc; - Evas_GL_Config *cfg; - 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) -{ - // 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); - - // Set a surface config - gld->cfg = evas_gl_config_new(); - gld->cfg->color_format = EVAS_GL_RGBA_8888; - //gld->cfg->depth_bits = EVAS_GL_DEPTH_NONE; // Othe config options - //gld->cfg->stencil_bits = EVAS_GL_STENCIL_NONE; - //gld->cfg->options_bits = EVAS_GL_OPTIONS_NONE; - - // create a surface and context - gld->sfc = evas_gl_surface_create(gld->evasgl, gld->cfg, 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_config_free(gld->cfg); - 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->glUseProgram(gld->program); - - 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 - */ - -/** - * @addtogroup Evas_GL - * @{ - */ - -/** - * 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); - -/** - * Allocates a new config object for the user to fill out. - * - * As long as the Evas creates a config object for the user, it takes care - * of the backward compatibility issue. - */ -EAPI Evas_GL_Config *evas_gl_config_new (void); - -/** - * Frees a config object created from evas_gl_config_new. - * - * As long as the Evas creates a config object for the user, it takes care - * of the backward compatibility issue. - */ -EAPI void evas_gl_config_free (Evas_GL_Config *cfg) EINA_ARG_NONNULL(1); - -/** - * Creates and returns new Evas_GL_Surface object for GL Rendering. - * - * @param evas_gl The given Evas_GL object. - * @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 pointer to a static, zero-terminated string describing some aspect of evas_gl. - * - * @param evas_gl The given Evas_GL object. - * @param name Specifies a symbolic constant, one of EVAS_GL_EXTENSIONS... - */ -EAPI const char *evas_gl_string_query (Evas_GL *evas_gl, int name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - -/** - * 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 - -//---------------------------// -// GLES extension defines - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#define GL_ETC1_RGB8_OES 0x8D64 - -/* GL_OES_compressed_paletted_texture */ -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 - -/* GL_OES_depth24 */ -#define GL_DEPTH_COMPONENT24_OES 0x81A6 - -/* GL_OES_depth32 */ -#define GL_DEPTH_COMPONENT32_OES 0x81A7 - -/* GL_OES_get_program_binary */ -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF - -/* GL_OES_mapbuffer */ -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD - -/* GL_OES_packed_depth_stencil */ -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 - -/* GL_OES_rgb8_rgba8 */ -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 - -/* GL_OES_standard_derivatives */ -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B - -/* GL_OES_stencil1 */ -#define GL_STENCIL_INDEX1_OES 0x8D46 - -/* GL_OES_stencil4 */ -#define GL_STENCIL_INDEX4_OES 0x8D47 - -/* GL_OES_texture_3D */ -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 - -/* GL_OES_texture_float */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_half_float */ -#define GL_HALF_FLOAT_OES 0x8D61 - -/* GL_OES_texture_half_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_vertex_half_float */ -/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ - -/* GL_OES_vertex_type_10_10_10_2 */ -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA - -/* GL_AMD_compressed_ATC_texture */ -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE - -/* GL_AMD_performance_monitor */ -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 - -/* GL_AMD_program_binary_Z400 */ -#define GL_Z400_BINARY_AMD 0x8740 - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 - -/* GL_EXT_discard_framebuffer */ -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_read_format_bgra */ -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 - -/* GL_EXT_texture_filter_anisotropic */ -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF - -/* GL_EXT_texture_format_BGRA8888 */ -#define GL_BGRA_EXT 0x80E1 - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 - -/* GL_IMG_read_format */ -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 - -/* GL_IMG_shader_binary */ -#define GL_SGX_BINARY_IMG 0x8C0A - -/* GL_IMG_texture_compression_pvrtc */ -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_fence */ -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 - -/* GL_QCOM_writeonly_rendering */ -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/* EvasGL_KHR_image */ -#define EVAS_GL_NATIVE_PIXMAP 0x30B0 /* evasglCreateImage target */ - -/* EvasGL_KHR_vg_parent_image */ -#define EVAS_VG_PARENT_IMAGE 0x30BA /* evasglCreateImage target */ - -/* EvasGL_KHR_gl_texture_2D_image */ -#define EVAS_GL_TEXTURE_2D 0x30B1 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_LEVEL 0x30BC /* evasglCreateImage attribute */ - -/* EvasGL_KHR_gl_texture_cubemap_image */ -#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 /* evasglCreateImage target */ - -/* EvasGL_KHR_gl_texture_3D_image */ -#define EVAS_GL_TEXTURE_3D 0x30B2 /* evasglCreateImage target */ -#define EVAS_GL_TEXTURE_ZOFFSET 0x30BD /* evasglCreateImage attribute */ - -/* EvasGL_KHR_gl_renderbuffer_image */ -#define EVAS_GL_RENDERBUFFER 0x30B9 /* evasglCreateImage target */ - -#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: */ - /*------- GLES 2.0 -------*/ - 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); - - /*------- GLES 2.0 Extensions -------*/ - // Notice these two names have been changed to fit Evas GL and not EGL! - /* GL_OES_EvasGL_image */ - void (*glEvasGLImageTargetTexture2DOES) (GLenum target, EvasGLImage image); - void (*glEvasGLImageTargetRenderbufferStorageOES) (GLenum target, EvasGLImage image); - - /* GL_OES_get_program_binary */ - void (*glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); - void (*glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); - /* GL_OES_mapbuffer */ - void* (*glMapBufferOES) (GLenum target, GLenum access); - GLboolean (*glUnmapBufferOES) (GLenum target); - void (*glGetBufferPointervOES) (GLenum target, GLenum pname, void** params); - /* GL_OES_texture_3D */ - void (*glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); - void (*glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); - void (*glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - void (*glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); - void (*glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); - void (*glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); - - /* AMD_performance_monitor */ - void (*glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups); - void (*glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters); - void (*glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString); - void (*glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString); - void (*glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data); - void (*glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors); - void (*glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors); - void (*glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList); - void (*glBeginPerfMonitorAMD) (GLuint monitor); - void (*glEndPerfMonitorAMD) (GLuint monitor); - void (*glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten); - - /* GL_EXT_discard_framebuffer */ - void (*glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments); - - /* GL_EXT_multi_draw_arrays */ - void (*glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount); - void (*glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount); - - /* GL_NV_fence */ - void (*glDeleteFencesNV) (GLsizei n, const GLuint* fences); - void (*glGenFencesNV) (GLsizei n, GLuint* fences); - GLboolean (*glIsFenceNV) (GLuint fence); - GLboolean (*glTestFenceNV) (GLuint fence); - void (*glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params); - void (*glFinishFenceNV) (GLuint fence); - void (*glSetFenceNV) (GLuint, GLenum); - - /* GL_QCOM_driver_control */ - void (*glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls); - void (*glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString); - void (*glEnableDriverControlQCOM) (GLuint driverControl); - void (*glDisableDriverControlQCOM) (GLuint driverControl); - - /* GL_QCOM_extended_get */ - void (*glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures); - void (*glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers); - void (*glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers); - void (*glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers); - void (*glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params); - void (*glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param); - void (*glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels); - void (*glExtGetBufferPointervQCOM) (GLenum target, void** params); - - - /* GL_QCOM_extended_get2 */ - void (*glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders); - void (*glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms); - GLboolean (*glExtIsProgramBinaryQCOM) (GLuint program); - void (*glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length); - - //------- EGL Related Extensions -------// - /* EvasGL_KHR_image */ - EvasGLImage (*evasglCreateImage) (int target, void* buffer, int* attrib_list); - void (*evasglDestroyImage) (EvasGLImage image); - - /* future calls will be added down here for expansion */ - /* version 2: */ -}; - - -#ifdef __cplusplus -} -#endif - -#endif -/** - * @} - */ diff --git a/libraries/evas/src/lib/Makefile.am b/libraries/evas/src/lib/Makefile.am deleted file mode 100644 index 1240b2b..0000000 --- a/libraries/evas/src/lib/Makefile.am +++ /dev/null @@ -1,260 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -SUBDIRS = canvas cache cserve file engines include -EVAS_STATIC_MODULE = -EVAS_STATIC_LIBADD = - -if EVAS_STATIC_BUILD_SOFTWARE_GENERIC -SUBDIRS += ../modules/engines/software_generic/ -EVAS_STATIC_MODULE += ../modules/engines/software_generic/libevas_engine_software_generic.la -endif -if EVAS_STATIC_BUILD_BUFFER -SUBDIRS += ../modules/engines/buffer/ -EVAS_STATIC_MODULE += ../modules/engines/buffer/libevas_engine_buffer.la -endif -if EVAS_STATIC_BUILD_DIRECT3D -SUBDIRS += ../modules/engines/direct3d/ -EVAS_STATIC_MODULE += ../modules/engines/direct3d/libevas_engine_direct3d.la -EVAS_STATIC_LIBADD += @evas_engine_direct3d_libs@ -endif -if EVAS_STATIC_BUILD_DIRECTFB -SUBDIRS += ../modules/engines/directfb/ -EVAS_STATIC_MODULE += ../modules/engines/directfb/libevas_engine_directfb.la -EVAS_STATIC_LIBADD += @evas_engine_directfb_libs@ -endif -if EVAS_STATIC_BUILD_FB -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_X11 -SUBDIRS += \ - ../modules/engines/gl_common \ - ../modules/engines/gl_x11 -EVAS_STATIC_MODULE += \ - ../modules/engines/gl_x11/libevas_engine_gl_x11.la -EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@ -endif -if EVAS_STATIC_BUILD_GL_SDL -SUBDIRS += \ - ../modules/engines/gl_common \ - ../modules/engines/gl_sdl -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_PSL1GHT -SUBDIRS += ../modules/engines/psl1ght/ -EVAS_STATIC_MODULE += ../modules/engines/psl1ght/libevas_engine_psl1ght.la -EVAS_STATIC_LIBADD += @evas_engine_psl1ght_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 -endif -if EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW -SUBDIRS += ../modules/engines/software_16_ddraw/ -EVAS_STATIC_MODULE += ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la -EVAS_STATIC_LIBADD += @evas_engine_software_16_ddraw_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_16_WINCE -SUBDIRS += ../modules/engines/software_16_wince/ -EVAS_STATIC_MODULE += ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la -EVAS_STATIC_LIBADD += @evas_engine_software_16_wince_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_16_X11 -SUBDIRS += ../modules/engines/software_16_x11/ -EVAS_STATIC_MODULE += ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la -EVAS_STATIC_LIBADD += @evas_engine_software_16_x11_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_8 -SUBDIRS += ../modules/engines/software_8/ -EVAS_STATIC_MODULE += ../modules/engines/software_8/libevas_engine_software_8.la -endif -if EVAS_STATIC_BUILD_SOFTWARE_8_X11 -SUBDIRS += ../modules/engines/software_8_x11/ -EVAS_STATIC_MODULE += ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la -EVAS_STATIC_LIBADD += @evas_engine_software_8_x11_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_16_SDL -SUBDIRS += \ - ../modules/engines/software_16_sdl/ -EVAS_STATIC_MODULE += \ - ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la -EVAS_STATIC_LIBADD += @SDL_LIBS@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_DDRAW -SUBDIRS += ../modules/engines/software_ddraw/ -EVAS_STATIC_MODULE += ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la -EVAS_STATIC_LIBADD += @evas_engine_software_ddraw_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_GDI -SUBDIRS += ../modules/engines/software_gdi/ -EVAS_STATIC_MODULE += ../modules/engines/software_gdi/libevas_engine_software_gdi.la -EVAS_STATIC_LIBADD += @evas_engine_software_gdi_libs@ -endif -if EVAS_STATIC_BUILD_SOFTWARE_X11 -SUBDIRS += ../modules/engines/software_x11/ -EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la -EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ -endif -if EVAS_STATIC_BUILD_WAYLAND_SHM -SUBDIRS += ../modules/engines/wayland_shm/ -EVAS_STATIC_MODULE += ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la -EVAS_STATIC_LIBADD += @evas_engine_wayland_shm_libs@ -endif -if EVAS_STATIC_BUILD_BMP -SUBDIRS += ../modules/loaders/bmp -EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la -EVAS_STATIC_LIBADD += @evas_image_loader_bmp_libs@ -endif -if EVAS_STATIC_BUILD_EDB -SUBDIRS += ../modules/savers/edb ../modules/loaders/edb -EVAS_STATIC_MODULE += ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la -EVAS_STATIC_LIBADD += @evas_image_loader_edb_libs@ -endif -if EVAS_STATIC_BUILD_EET -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 -EVAS_STATIC_LIBADD += @evas_image_loader_gif_libs@ -endif -if EVAS_STATIC_BUILD_ICO -SUBDIRS += ../modules/loaders/ico -EVAS_STATIC_MODULE += ../modules/loaders/ico/libevas_loader_ico.la -EVAS_STATIC_LIBADD += @evas_image_loader_ico_libs@ -endif -if EVAS_STATIC_BUILD_JPEG -SUBDIRS += ../modules/loaders/jpeg -EVAS_STATIC_MODULE += ../modules/loaders/jpeg/libevas_loader_jpeg.la -if BUILD_SAVER_JPEG -SUBDIRS += ../modules/savers/jpeg -EVAS_STATIC_MODULE += ../modules/savers/jpeg/libevas_saver_jpeg.la -endif -EVAS_STATIC_LIBADD += @evas_image_loader_jpeg_libs@ -endif -if EVAS_STATIC_BUILD_PMAPS -SUBDIRS += ../modules/loaders/pmaps -EVAS_STATIC_MODULE += ../modules/loaders/pmaps/libevas_loader_pmaps.la -EVAS_STATIC_LIBADD += @evas_image_loader_pmaps_libs@ -endif -if EVAS_STATIC_BUILD_PNG -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 -EVAS_STATIC_LIBADD += @evas_image_loader_svg_libs@ -endif -if EVAS_STATIC_BUILD_TGA -SUBDIRS += ../modules/loaders/tga -EVAS_STATIC_MODULE += ../modules/loaders/tga/libevas_loader_tga.la -EVAS_STATIC_LIBADD += @evas_image_loader_tga_libs@ -endif -if EVAS_STATIC_BUILD_TIFF -SUBDIRS += ../modules/savers/tiff ../modules/loaders/tiff -EVAS_STATIC_MODULE += ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la -EVAS_STATIC_LIBADD += @evas_image_loader_tiff_libs@ -endif -if EVAS_STATIC_BUILD_WBMP -SUBDIRS += ../modules/loaders/wbmp -EVAS_STATIC_MODULE += ../modules/loaders/wbmp/libevas_loader_wbmp.la -EVAS_STATIC_LIBADD += @evas_image_loader_wbmp_libs@ -endif -if EVAS_STATIC_BUILD_XPM -SUBDIRS += ../modules/loaders/xpm -EVAS_STATIC_MODULE += ../modules/loaders/xpm/libevas_loader_xpm.la -EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@ -endif - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@FREETYPE_CFLAGS@ \ -@FRIBIDI_CFLAGS@ \ -@HARFBUZZ_CFLAGS@ \ -@EET_CFLAGS@ \ -@FONTCONFIG_CFLAGS@ \ -@pthread_cflags@ \ -@PIXMAN_CFLAGS@ - -lib_LTLIBRARIES = libevas.la - -includes_HEADERS = Evas.h Evas_GL.h -includesdir = $(includedir)/evas-@VMAJ@ - -libevas_la_SOURCES = main.c - -if EVAS_CSERVE - -libevas_cserve_la = cserve/libevas_cserve.la - -endif - -libevas_la_LIBADD = \ -canvas/libevas_canvas.la \ -file/libevas_file.la \ -cache/libevas_cache.la \ -$(libevas_cserve_la) \ -engines/common/libevas_engine_common.la \ -@FREETYPE_LIBS@ \ -@FRIBIDI_LIBS@ \ -@HARFBUZZ_LIBS@ \ -@EET_LIBS@ \ -@FONTCONFIG_LIBS@ \ -@pthread_libs@ \ -@EINA_LIBS@ \ -$(EVAS_STATIC_MODULE) \ -$(EVAS_STATIC_LIBADD) \ -@PIXMAN_LIBS@ \ --lm - -libevas_la_DEPENDENCIES = \ -canvas/libevas_canvas.la \ -file/libevas_file.la \ -cache/libevas_cache.la \ -$(libevas_cserve_la) \ -engines/common/libevas_engine_common.la \ -$(EVAS_STATIC_MODULE) - -if BUILD_ENGINE_SOFTWARE_16 - -libevas_la_LIBADD += engines/common_16/libevas_engine_common_16.la -libevas_la_DEPENDENCIES += engines/common_16/libevas_engine_common_16.la - -endif - -if BUILD_ENGINE_SOFTWARE_8 - -libevas_la_LIBADD += engines/common_8/libevas_engine_common_8.la -libevas_la_DEPENDENCIES += engines/common_8/libevas_engine_common_8.la - -endif - -libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ - -### Evas_GL we are still using it in our code, so just don't install it. -EXTRA_DIST=Evas_GL.h - -DIST_SUBDIRS = canvas cache cserve file engines include diff --git a/libraries/evas/src/lib/Makefile.in b/libraries/evas/src/lib/Makefile.in deleted file mode 100644 index cb04330..0000000 --- a/libraries/evas/src/lib/Makefile.in +++ /dev/null @@ -1,1094 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_1 = ../modules/engines/software_generic/ -@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_2 = ../modules/engines/software_generic/libevas_engine_software_generic.la -@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_3 = ../modules/engines/buffer/ -@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_4 = ../modules/engines/buffer/libevas_engine_buffer.la -@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_5 = ../modules/engines/direct3d/ -@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_6 = ../modules/engines/direct3d/libevas_engine_direct3d.la -@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_7 = @evas_engine_direct3d_libs@ -@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_8 = ../modules/engines/directfb/ -@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_9 = ../modules/engines/directfb/libevas_engine_directfb.la -@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_10 = @evas_engine_directfb_libs@ -@EVAS_STATIC_BUILD_FB_TRUE@am__append_11 = ../modules/engines/fb/ -@EVAS_STATIC_BUILD_FB_TRUE@am__append_12 = ../modules/engines/fb/libevas_engine_fb.la -@EVAS_STATIC_BUILD_FB_TRUE@am__append_13 = @evas_engine_fb_libs@ -@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_14 = \ -@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_common \ -@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11 - -@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_15 = \ -@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11/libevas_engine_gl_x11.la - -@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_16 = @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@ -@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_17 = \ -@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_common \ -@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl - -@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_18 = \ -@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la - -@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_19 = @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@ -@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_20 = ../modules/engines/psl1ght/ -@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_21 = ../modules/engines/psl1ght/libevas_engine_psl1ght.la -@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_22 = @evas_engine_psl1ght_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_23 = ../modules/engines/software_16/ -@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_24 = ../modules/engines/software_16/libevas_engine_software_16.la -@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_25 = ../modules/engines/software_16_ddraw/ -@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_26 = ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la -@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_27 = @evas_engine_software_16_ddraw_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_28 = ../modules/engines/software_16_wince/ -@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_29 = ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la -@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_30 = @evas_engine_software_16_wince_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_31 = ../modules/engines/software_16_x11/ -@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_32 = ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la -@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_33 = @evas_engine_software_16_x11_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_34 = ../modules/engines/software_8/ -@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_35 = ../modules/engines/software_8/libevas_engine_software_8.la -@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_36 = ../modules/engines/software_8_x11/ -@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_37 = ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la -@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_38 = @evas_engine_software_8_x11_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_39 = \ -@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/ - -@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_40 = \ -@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la - -@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_41 = @SDL_LIBS@ -@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_42 = ../modules/engines/software_ddraw/ -@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_43 = ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la -@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_44 = @evas_engine_software_ddraw_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_45 = ../modules/engines/software_gdi/ -@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_46 = ../modules/engines/software_gdi/libevas_engine_software_gdi.la -@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_47 = @evas_engine_software_gdi_libs@ -@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_48 = ../modules/engines/software_x11/ -@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_49 = ../modules/engines/software_x11/libevas_engine_software_x11.la -@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_50 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ -@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_51 = ../modules/engines/wayland_shm/ -@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_52 = ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la -@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_53 = @evas_engine_wayland_shm_libs@ -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_54 = ../modules/loaders/bmp -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_55 = ../modules/loaders/bmp/libevas_loader_bmp.la -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_56 = @evas_image_loader_bmp_libs@ -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_57 = ../modules/savers/edb ../modules/loaders/edb -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_58 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_59 = @evas_image_loader_edb_libs@ -@EVAS_STATIC_BUILD_EET_TRUE@am__append_60 = ../modules/savers/eet ../modules/loaders/eet -@EVAS_STATIC_BUILD_EET_TRUE@am__append_61 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la -@EVAS_STATIC_BUILD_EET_TRUE@am__append_62 = @evas_image_loader_eet_libs@ -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_63 = ../modules/loaders/generic -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_64 = ../modules/loaders/generic/libevas_loader_generic.la -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_65 = @evas_image_loader_generic_libs@ -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_66 = ../modules/loaders/gif -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_67 = ../modules/loaders/gif/libevas_loader_gif.la -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_68 = @evas_image_loader_gif_libs@ -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_69 = ../modules/loaders/ico -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_70 = ../modules/loaders/ico/libevas_loader_ico.la -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_71 = @evas_image_loader_ico_libs@ -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/loaders/jpeg -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = ../modules/loaders/jpeg/libevas_loader_jpeg.la -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_74 = ../modules/savers/jpeg -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_75 = ../modules/savers/jpeg/libevas_saver_jpeg.la -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_76 = @evas_image_loader_jpeg_libs@ -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_77 = ../modules/loaders/pmaps -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_78 = ../modules/loaders/pmaps/libevas_loader_pmaps.la -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_79 = @evas_image_loader_pmaps_libs@ -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_80 = ../modules/savers/png ../modules/loaders/png -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_81 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_82 = @evas_image_loader_png_libs@ -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_83 = ../modules/loaders/psd -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_84 = ../modules/loaders/psd/libevas_loader_psd.la -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_85 = @evas_image_loader_psd_libs@ -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_86 = ../modules/loaders/svg -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_87 = ../modules/loaders/svg/libevas_loader_svg.la -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_88 = @evas_image_loader_svg_libs@ -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_89 = ../modules/loaders/tga -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_90 = ../modules/loaders/tga/libevas_loader_tga.la -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_91 = @evas_image_loader_tga_libs@ -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_92 = ../modules/savers/tiff ../modules/loaders/tiff -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_93 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_94 = @evas_image_loader_tiff_libs@ -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_95 = ../modules/loaders/wbmp -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_96 = ../modules/loaders/wbmp/libevas_loader_wbmp.la -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_97 = @evas_image_loader_wbmp_libs@ -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_98 = ../modules/loaders/xpm -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_99 = ../modules/loaders/xpm/libevas_loader_xpm.la -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_100 = @evas_image_loader_xpm_libs@ -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_101 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_102 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_103 = engines/common_8/libevas_engine_common_8.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_104 = engines/common_8/libevas_engine_common_8.la -subdir = src/lib -DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_libevas_la_OBJECTS = main.lo -libevas_la_OBJECTS = $(am_libevas_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libevas_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libevas_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_la_SOURCES) -DIST_SOURCES = $(libevas_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(includes_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = canvas cache cserve file engines include $(am__append_1) \ - $(am__append_3) $(am__append_5) $(am__append_8) \ - $(am__append_11) $(am__append_14) $(am__append_17) \ - $(am__append_20) $(am__append_23) $(am__append_25) \ - $(am__append_28) $(am__append_31) $(am__append_34) \ - $(am__append_36) $(am__append_39) $(am__append_42) \ - $(am__append_45) $(am__append_48) $(am__append_51) \ - $(am__append_54) $(am__append_57) $(am__append_60) \ - $(am__append_63) $(am__append_66) $(am__append_69) \ - $(am__append_72) $(am__append_74) $(am__append_77) \ - $(am__append_80) $(am__append_83) $(am__append_86) \ - $(am__append_89) $(am__append_92) $(am__append_95) \ - $(am__append_98) -EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ - $(am__append_9) $(am__append_12) $(am__append_15) \ - $(am__append_18) $(am__append_21) $(am__append_24) \ - $(am__append_26) $(am__append_29) $(am__append_32) \ - $(am__append_35) $(am__append_37) $(am__append_40) \ - $(am__append_43) $(am__append_46) $(am__append_49) \ - $(am__append_52) $(am__append_55) $(am__append_58) \ - $(am__append_61) $(am__append_64) $(am__append_67) \ - $(am__append_70) $(am__append_73) $(am__append_75) \ - $(am__append_78) $(am__append_81) $(am__append_84) \ - $(am__append_87) $(am__append_90) $(am__append_93) \ - $(am__append_96) $(am__append_99) -EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \ - $(am__append_16) $(am__append_19) $(am__append_22) \ - $(am__append_27) $(am__append_30) $(am__append_33) \ - $(am__append_38) $(am__append_41) $(am__append_44) \ - $(am__append_47) $(am__append_50) $(am__append_53) \ - $(am__append_56) $(am__append_59) $(am__append_62) \ - $(am__append_65) $(am__append_68) $(am__append_71) \ - $(am__append_76) $(am__append_79) $(am__append_82) \ - $(am__append_85) $(am__append_88) $(am__append_91) \ - $(am__append_94) $(am__append_97) $(am__append_100) -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@FREETYPE_CFLAGS@ \ -@FRIBIDI_CFLAGS@ \ -@HARFBUZZ_CFLAGS@ \ -@EET_CFLAGS@ \ -@FONTCONFIG_CFLAGS@ \ -@pthread_cflags@ \ -@PIXMAN_CFLAGS@ - -lib_LTLIBRARIES = libevas.la -includes_HEADERS = Evas.h Evas_GL.h -includesdir = $(includedir)/evas-@VMAJ@ -libevas_la_SOURCES = main.c -@EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la -libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \ - cache/libevas_cache.la $(libevas_cserve_la) \ - engines/common/libevas_engine_common.la @FREETYPE_LIBS@ \ - @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ @FONTCONFIG_LIBS@ \ - @pthread_libs@ @EINA_LIBS@ $(EVAS_STATIC_MODULE) \ - $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_101) \ - $(am__append_103) -libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \ - file/libevas_file.la cache/libevas_cache.la \ - $(libevas_cserve_la) engines/common/libevas_engine_common.la \ - $(EVAS_STATIC_MODULE) $(am__append_102) $(am__append_104) -libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ - -### Evas_GL we are still using it in our code, so just don't install it. -EXTRA_DIST = Evas_GL.h -DIST_SUBDIRS = canvas cache cserve file engines include -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas.la: $(libevas_la_OBJECTS) $(libevas_la_DEPENDENCIES) - $(AM_V_CCLD)$(libevas_la_LINK) -rpath $(libdir) $(libevas_la_OBJECTS) $(libevas_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includesHEADERS: $(includes_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" - @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ - done - -uninstall-includesHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includesdir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-includesHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am \ - install-includesHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-includesHEADERS uninstall-libLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/cache/Makefile.am b/libraries/evas/src/lib/cache/Makefile.am deleted file mode 100644 index 78d58d2..0000000 --- a/libraries/evas/src/lib/cache/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I. \ - -I$(top_srcdir)/src/lib \ - -I$(top_srcdir)/src/lib/include \ - -DPACKAGE_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_LIB_DIR=\"$(libdir)\" \ - -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ - @EVIL_CFLAGS@ \ - @FREETYPE_CFLAGS@ \ - @PIXMAN_CFLAGS@ \ - @EINA_CFLAGS@ \ - @PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_cache.la -libevas_cache_la_SOURCES = \ -evas_cache_image.c \ -evas_cache_engine_image.c \ -evas_preload.c - -libevas_cache_la_LIBAD = @EVIL_LIBS@ - -libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h - -EXTRA_DIST = evas_cache.h diff --git a/libraries/evas/src/lib/cache/Makefile.in b/libraries/evas/src/lib/cache/Makefile.in deleted file mode 100644 index fce77cc..0000000 --- a/libraries/evas/src/lib/cache/Makefile.in +++ /dev/null @@ -1,686 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/cache -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_cache_la_LIBADD = -am_libevas_cache_la_OBJECTS = evas_cache_image.lo \ - evas_cache_engine_image.lo evas_preload.lo -libevas_cache_la_OBJECTS = $(am_libevas_cache_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_cache_la_SOURCES) -DIST_SOURCES = $(libevas_cache_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I. \ - -I$(top_srcdir)/src/lib \ - -I$(top_srcdir)/src/lib/include \ - -DPACKAGE_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_LIB_DIR=\"$(libdir)\" \ - -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ - @EVIL_CFLAGS@ \ - @FREETYPE_CFLAGS@ \ - @PIXMAN_CFLAGS@ \ - @EINA_CFLAGS@ \ - @PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_cache.la -libevas_cache_la_SOURCES = \ -evas_cache_image.c \ -evas_cache_engine_image.c \ -evas_preload.c - -libevas_cache_la_LIBAD = @EVIL_LIBS@ -libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h -EXTRA_DIST = evas_cache.h -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cache/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/cache/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_cache.la: $(libevas_cache_la_OBJECTS) $(libevas_cache_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_cache_la_OBJECTS) $(libevas_cache_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_engine_image.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_image.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_preload.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/cache/evas_cache.h b/libraries/evas/src/lib/cache/evas_cache.h deleted file mode 100644 index 0947a6d..0000000 --- a/libraries/evas/src/lib/cache/evas_cache.h +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef _EVAS_CACHE_H -#define _EVAS_CACHE_H - - -typedef struct _Evas_Cache_Image Evas_Cache_Image; -typedef struct _Evas_Cache_Image_Func Evas_Cache_Image_Func; -typedef struct _Evas_Cache_Engine_Image Evas_Cache_Engine_Image; -typedef struct _Evas_Cache_Engine_Image_Func Evas_Cache_Engine_Image_Func; - - -struct _Evas_Cache_Image_Func -{ - Image_Entry *(*alloc)(void); - void (*dealloc)(Image_Entry *im); - - /* The cache provide some helpers for surface manipulation. */ - int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h); - void (*surface_delete)(Image_Entry *im); - DATA32 *(*surface_pixels)(Image_Entry *im); - - /* The cache is doing the allocation and deallocation, you must just do the rest. */ - int (*constructor)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ - void (*destructor)(Image_Entry *im); - - void (*dirty_region)(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); - /* Only called when references > 0. Need to provide a fresh copie of im. */ - /* The destination surface does have a surface, but no allocated pixel data. */ - int (*dirty)(Image_Entry *dst, const Image_Entry *src); - /* Only called when references == 1. We will call drop on `im'. */ - /* The destination surface does not have any surface. */ - int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h); - - /* The destination surface does not have any surface. */ - int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); - /* The destination surface does not have any surface. */ - int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); - int (*color_space)(Image_Entry *dst, int cspace); - - /* This function need to update im->w and im->h. */ - int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ - int (*mem_size_get)(Image_Entry *im); - void (*debug)(const char *context, Image_Entry *im); -}; - -struct _Evas_Cache_Image -{ - Evas_Cache_Image_Func func; - - Eina_List *preload; - Eina_List *pending; - - Eina_Inlist *dirty; - - Eina_Inlist *lru; - Eina_Inlist *lru_nodata; - Eina_Hash *inactiv; - Eina_Hash *activ; - void *data; - - int usage; - unsigned int limit; - int references; -#ifdef EVAS_FRAME_QUEUING - LK(lock); -#endif -}; - -struct _Evas_Cache_Engine_Image_Func -{ - /* Must return a char* allocated with eina_stringshare_add. */ - char* (*key)(Image_Entry *im, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); - - Engine_Image_Entry* (*alloc)(void); - void (*dealloc)(Engine_Image_Entry *eim); - - int (*constructor)(Engine_Image_Entry *eim, void* data); - void (*destructor)(Engine_Image_Entry *eim); - - void (*dirty_region)(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); - /* Only called when references > 0. Need to provide a fresh copie of im. */ - int (*dirty)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); - /* Only called when references == 1. We will call drop on `im'. */ - int (*size_set)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); - - int (*update_data)(Engine_Image_Entry* dst, void* data); - - void (*load)(Engine_Image_Entry *eim, const Image_Entry* im); - int (*mem_size_get)(Engine_Image_Entry *eim); - void (*debug)(const char* context, Engine_Image_Entry *eim); -}; - -struct _Evas_Cache_Engine_Image -{ - Evas_Cache_Engine_Image_Func func; - - Eina_Inlist* dirty; - - Eina_Hash* activ; - Eina_Hash* inactiv; - Eina_Inlist* lru; - - Evas_Cache_Image* parent; - Evas_Cache_Engine_Image* brother; - - int usage; - int limit; - - int references; -}; - - -#ifdef __cplusplus -extern "C" { -#endif - - -EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb); -EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache); -EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); -EAPI void evas_cache_image_drop(Image_Entry *im); -EAPI void evas_cache_image_data_not_needed(Image_Entry *im); -EAPI int evas_cache_image_flush(Evas_Cache_Image *cache); -EAPI void evas_cache_private_set(Evas_Cache_Image *cache, const void *data); -EAPI void* evas_cache_private_get(Evas_Cache_Image *cache); -EAPI void* evas_cache_private_from_image_entry_get(Image_Entry *im); - -EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache); -EAPI int evas_cache_image_get(Evas_Cache_Image *cache); -EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int size); - -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 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); -EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h); -EAPI DATA32* evas_cache_image_pixels(Image_Entry *im); -EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace); -EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache); -EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h); - -EAPI Evas_Cache_Engine_Image* evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent); -EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache); - -EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache); -EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache); -EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit); - -EAPI Engine_Image_Entry* evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, void *engine_data, int *error); -EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim); -EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data); -EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim); -EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data); -EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); -EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); -EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); -EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data); -EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h); - -EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim); - -EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target); -EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const void *target); - -EAPI void evas_cache_image_wakeup(void); - -#ifdef __cplusplus -} -#endif - - -#endif /* _EVAS_CACHE_H */ diff --git a/libraries/evas/src/lib/cache/evas_cache_engine_image.c b/libraries/evas/src/lib/cache/evas_cache_engine_image.c deleted file mode 100644 index 5ec1af2..0000000 --- a/libraries/evas/src/lib/cache/evas_cache_engine_image.c +++ /dev/null @@ -1,703 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include "evas_common.h" -#include "evas_private.h" - -static void -_evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache, - Engine_Image_Entry *eim) -{ - eim->flags.cached = 1; - eim->flags.dirty = 1; - eim->flags.loaded = 1; - eim->flags.activ = 0; - cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(eim)); -} - -static void -_evas_cache_engine_image_make_active(Evas_Cache_Engine_Image *cache, - Engine_Image_Entry *eim, - const char *key) -{ - eim->flags.cached = 1; - eim->flags.activ = 1; - eim->flags.dirty = 0; - eina_hash_add(cache->activ, key, eim); -} - -static void -_evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache, - Engine_Image_Entry *eim, - const char *key) -{ - eim->flags.cached = 1; - eim->flags.dirty = 0; - eim->flags.activ = 0; - eina_hash_add(cache->inactiv, key, eim); - cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(eim)); - cache->usage += cache->func.mem_size_get(eim); -} - -static void -_evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache, - Engine_Image_Entry *eim) -{ - if (eim->flags.cached) - { - if (eim->flags.dirty) - { - cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(eim)); - } - else - if (eim->flags.activ) - { - eina_hash_del(cache->activ, eim->cache_key, eim); - } - else - { - cache->usage -= cache->func.mem_size_get(eim); - eina_hash_del(cache->inactiv, eim->cache_key, eim); - cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(eim)); - } - eim->flags.cached = 0; - eim->flags.dirty = 0; - eim->flags.activ = 0; - } -} - -static Engine_Image_Entry * -_evas_cache_engine_image_alloc(Evas_Cache_Engine_Image *cache, - Image_Entry *ie, - const char *hkey) -{ - Engine_Image_Entry *eim; - - assert(cache); - - if (cache->func.alloc) - eim = cache->func.alloc(); - else - eim = malloc(sizeof (Engine_Image_Entry)); - - if (!eim) goto on_error; - memset(eim, 0, sizeof (Engine_Image_Entry)); - - eim->cache = cache; - if (ie) - { - eim->w = ie->w; - eim->h = ie->h; - eim->src = ie; - eim->flags.need_parent = 1; - } - else - { - eim->w = -1; - eim->h = -1; - eim->flags.need_parent = 0; - eim->src = NULL; - } - - eim->flags.cached = 0; - eim->references = 0; - eim->cache_key = hkey; - - if (hkey) - _evas_cache_engine_image_make_active(cache, eim, hkey); - else - _evas_cache_engine_image_make_dirty(cache, eim); - - return eim; - - on_error: - if (eim) - evas_cache_engine_image_drop(eim); - eina_stringshare_del(hkey); - evas_cache_image_drop(ie); - return NULL; -} - -static void -_evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim) -{ - Image_Entry *im; - - if (cache->func.debug) cache->func.debug("delete", eim); - - _evas_cache_engine_image_remove_activ(cache, eim); - - im = eim->src; - cache->func.destructor(eim); - if (im) evas_cache_image_drop(im); - - if (cache->func.dealloc) - { - cache->func.dealloc(eim); - } - else - { - memset(eim, 0, sizeof (Engine_Image_Entry)); - free(eim); - } -} - -EAPI int -evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache) -{ - assert(cache != NULL); - - return cache->usage; -} - -EAPI int -evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache) -{ - assert(cache != NULL); - - return cache->limit; -} - -EAPI void -evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit) -{ - assert(cache != NULL); - - cache->limit = limit; -} - -EAPI Evas_Cache_Engine_Image * -evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent) -{ - Evas_Cache_Engine_Image *new; - - new = malloc(sizeof (Evas_Cache_Engine_Image)); - if (!new) - return NULL; - - new->func = *cb; - - new->limit = 0; - new->usage = 0; - - new->dirty = NULL; - new->lru = NULL; - new->activ = eina_hash_string_superfast_new(NULL); - new->inactiv = eina_hash_string_superfast_new(NULL); - - new->parent = parent; - parent->references++; - - new->brother = NULL; - - return new; -} - -EAPI Evas_Cache_Engine_Image * -evas_cache_engine_image_dup(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Engine_Image *brother) -{ - Evas_Cache_Engine_Image *new; - - new = calloc(1, sizeof (Evas_Cache_Engine_Image)); - if (!new) - return NULL; - - new->func = brother->func; - -#define ORD(Func) if (cb->Func) new->func.Func = cb->Func; - - ORD(key); - ORD(constructor); - ORD(destructor); - ORD(dirty_region); - ORD(dirty); - ORD(size_set); - ORD(update_data); - ORD(load); - ORD(mem_size_get); - ORD(debug); - -#undef ORD - - new->limit = -1; - new->usage = 0; - new->references = 1; - - new->dirty = NULL; - new->activ = NULL; - - new->parent = brother->parent; - new->parent->references++; - - new->brother = brother; - brother->references++; - - return new; -} - -static Eina_Bool -_evas_cache_engine_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) -{ - Eina_List **delete_list = fdata; - - *delete_list = eina_list_prepend(*delete_list, data); - - return EINA_TRUE; -} - -EAPI void -evas_cache_engine_image_flush(Evas_Cache_Engine_Image *cache) -{ - assert(cache != NULL); - - while ((cache->lru) && (cache->limit < cache->usage)) - { - Engine_Image_Entry *eim; - - eim = (Engine_Image_Entry *) cache->lru->last; - _evas_cache_engine_image_dealloc(cache, eim); - } -} - -EAPI void -evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache) -{ - Engine_Image_Entry *eim; - Eina_List *delete_list = NULL; - - assert(cache != NULL); - - if (cache->func.debug) cache->func.debug("shutdown-engine", NULL); - - eina_hash_foreach(cache->inactiv, _evas_cache_engine_image_free_cb, &delete_list); - eina_hash_foreach(cache->activ, _evas_cache_engine_image_free_cb, &delete_list); - - while (delete_list) - { - _evas_cache_engine_image_dealloc(cache, eina_list_data_get(delete_list)); - delete_list = eina_list_remove_list(delete_list, delete_list); - } - - eina_hash_free(cache->inactiv); - eina_hash_free(cache->activ); - - /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ - while (cache->dirty) - { - eim = (Engine_Image_Entry *) cache->dirty; - _evas_cache_engine_image_dealloc(cache, eim); - } - - - evas_cache_image_shutdown(cache->parent); - if (cache->brother) - evas_cache_engine_image_shutdown(cache->brother); - free(cache); -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, - const char *file, const char *key, - RGBA_Image_Loadopts *lo, void *data, int *error) -{ - Engine_Image_Entry *eim; - Image_Entry *im; - const char *ekey; - - assert(cache != NULL); - - *error = EVAS_LOAD_ERROR_NONE; - - ekey = NULL; - eim = NULL; - - im = evas_cache_image_request(cache->parent, file, key, lo, error); - if (!im) - goto on_error; - - if (cache->func.key) - ekey = cache->func.key(im, file, key, lo, data); - else - ekey = eina_stringshare_add(im->cache_key); - if (!ekey) - { - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - goto on_error; - } - - eim = eina_hash_find(cache->activ, ekey); - if (eim) - { - evas_cache_image_drop(im); - goto on_ok; - } - - eim = eina_hash_find(cache->inactiv, ekey); - if (eim) - { - _evas_cache_engine_image_remove_activ(cache, eim); - _evas_cache_engine_image_make_active(cache, eim, ekey); - evas_cache_image_drop(im); - goto on_ok; - } - - eim = _evas_cache_engine_image_alloc(cache, im, ekey); - if (!eim) - { - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return NULL; - } - - *error = cache->func.constructor(eim, data); - if (*error != EVAS_LOAD_ERROR_NONE) goto on_error; - if (cache->func.debug) - cache->func.debug("constructor-engine", eim); - - on_ok: - eim->references++; - return eim; - - on_error: - if (!eim) - { - if (im) evas_cache_image_drop(im); - if (ekey) eina_stringshare_del(ekey); - } - else - { - _evas_cache_engine_image_dealloc(cache, eim); - } - - return NULL; -} - -EAPI void -evas_cache_engine_image_drop(Engine_Image_Entry *eim) -{ - Evas_Cache_Engine_Image *cache; - - assert(eim); - assert(eim->cache); - - eim->references--; - cache = eim->cache; - - if (eim->flags.dirty) - { - _evas_cache_engine_image_dealloc(cache, eim); - return ; - } - - if (eim->references == 0) - { - _evas_cache_engine_image_remove_activ(cache, eim); - _evas_cache_engine_image_make_inactive(cache, eim, eim->cache_key); - evas_cache_engine_image_flush(cache); - return ; - } -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) -{ - Engine_Image_Entry *eim_dirty = eim; - Image_Entry *im_dirty = NULL; - Image_Entry *im; - Evas_Cache_Engine_Image *cache; - unsigned char alloc_eim; - - assert(eim); - assert(eim->cache); - - cache = eim->cache; - if (!(eim->flags.dirty)) - { - alloc_eim = 0; - - if (eim->flags.need_parent == 1) - { - im = eim->src; - im_dirty = evas_cache_image_dirty(im, x, y, w, h); - - /* If im == im_dirty, this meens that we have only one reference to the eim. */ - if (im != im_dirty) - { - if (eim->references == 1) - { - _evas_cache_engine_image_remove_activ(cache, eim); - _evas_cache_engine_image_make_dirty(cache, eim); - - eim->src = im_dirty; - } - else - alloc_eim = 1; - } - } - else - if (eim->references > 1) - { - alloc_eim = 1; - } - else - { - _evas_cache_engine_image_remove_activ(cache, eim_dirty); - _evas_cache_engine_image_make_dirty(cache, eim_dirty); - } - - if (alloc_eim == 1) - { - int error; - - eim_dirty = _evas_cache_engine_image_alloc(cache, im_dirty, NULL); - if (!eim_dirty) goto on_error; - - eim_dirty->w = eim->w; - eim_dirty->h = eim->h; - eim_dirty->references = 1; - - error = cache->func.dirty(eim_dirty, eim); - if (cache->func.debug) - cache->func.debug("dirty-engine", eim_dirty); - - if (error != 0) goto on_error; - - evas_cache_engine_image_drop(eim); - } - } - - if (cache->func.dirty_region) - cache->func.dirty_region(eim_dirty, x, y, w, h); - if (cache->func.debug) - cache->func.debug("dirty-region-engine", eim_dirty); - - return eim_dirty; - - on_error: - if (eim) evas_cache_engine_image_drop(eim); - if (eim_dirty && eim_dirty != eim) - evas_cache_engine_image_drop(eim_dirty); - else - if (im_dirty) evas_cache_image_drop(im_dirty); - - return NULL; -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data) -{ - Evas_Cache_Engine_Image *cache; - Image_Entry *im; - - - assert(eim); - assert(eim->cache); - - cache = eim->cache; - im = evas_cache_image_alone(eim->src); - if (im != eim->src) - { - eim = _evas_cache_engine_image_alloc(cache, im, NULL); - if (!eim) goto on_error; - - eim->references = 1; - - if (cache->func.constructor(eim, data) != EVAS_LOAD_ERROR_NONE) - goto on_error; - } - /* FIXME */ - return eim; - - on_error: - evas_cache_image_drop(im); - return NULL; -} - -static Engine_Image_Entry * -_evas_cache_engine_image_push_dirty(Evas_Cache_Engine_Image *cache, Image_Entry *im, void *engine_data) -{ - Engine_Image_Entry *eim; - int error; - - eim = _evas_cache_engine_image_alloc(cache, im, NULL); - if (!eim) goto on_error; - eim->references = 1; - - error = cache->func.update_data(eim, engine_data); - if (cache->func.debug) - cache->func.debug("dirty-update_data-engine", eim); - if (error != 0) goto on_error; - - return eim; - - on_error: - if (eim) - evas_cache_engine_image_drop(eim); - return NULL; -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) -{ - Image_Entry *im; - - assert(cache); - - im = evas_cache_image_copied_data(cache->parent, w, h, image_data, alpha, cspace); - - return _evas_cache_engine_image_push_dirty(cache, im, engine_data); -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) -{ - Image_Entry *im; - - assert(cache); - - im = evas_cache_image_data(cache->parent, w, h, image_data, alpha, cspace); - - return _evas_cache_engine_image_push_dirty(cache, im, engine_data); -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h) -{ - Evas_Cache_Engine_Image *cache; - Engine_Image_Entry *new; - Image_Entry *im; - const char *hkey; - int error; - - assert(eim); - assert(eim->cache); - assert(eim->references > 0); - - im = NULL; - cache = eim->cache; - - if (eim->flags.need_parent == 1) - { - assert(eim->src); - - if (eim->src->w == w - && eim->src->h == h) - return eim; - - im = evas_cache_image_size_set(eim->src, w, h); - /* FIXME: Good idea to call update_data ? */ - if (im == eim->src) return eim; - eim->src = NULL; - } - - hkey = (eim->references > 1 ) ? eina_stringshare_add(eim->cache_key) : NULL; - - new = _evas_cache_engine_image_alloc(cache, im, hkey); - if (!new) goto on_error; - - new->w = w; - new->h = h; - new->references = 1; - - error = cache->func.size_set(new, eim); - if (error) goto on_error; - - evas_cache_engine_image_drop(eim); - return new; - - on_error: - if (new) - evas_cache_engine_image_drop(new); - else - if (im) - evas_cache_image_drop(im); - evas_cache_engine_image_drop(eim); - - return NULL; -} - -EAPI void -evas_cache_engine_image_load_data(Engine_Image_Entry *eim) -{ - Evas_Cache_Engine_Image *cache; - int size = 0; - - assert(eim); - assert(eim->src); - assert(eim->cache); - - if (eim->flags.loaded) return; - - if (eim->src) - evas_cache_image_load_data(eim->src); - - cache = eim->cache; - if (cache->func.debug) - cache->func.debug("load-engine", eim); - - if (eim->flags.dirty) - size = cache->func.mem_size_get(eim); - cache = eim->cache; - cache->func.load(eim, eim->src); - if (eim->flags.dirty) - cache->usage += cache->func.mem_size_get(eim) - size; - - eim->flags.loaded = 1; -} - -EAPI Engine_Image_Entry * -evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data) -{ - Engine_Image_Entry *eim; - Image_Entry *ie; - int error; - - ie = evas_cache_image_empty(cache->parent); - if (!ie) return NULL; - - eim = _evas_cache_engine_image_alloc(cache, ie, NULL); - if (!eim) goto on_error; - eim->references = 1; - - error = cache->func.update_data(eim, engine_data); - if (cache->func.debug) - cache->func.debug("update_data-engine", eim); - - if (error != 0) goto on_error; - - return eim; - - on_error: - if (!eim) - evas_cache_image_drop(ie); - else - evas_cache_engine_image_drop(eim); - - return NULL; -} - -EAPI void -evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data) -{ - Evas_Cache_Engine_Image *cache = eim->cache; - - assert(cache); - - cache->func.destructor(eim); - evas_cache_image_colorspace(eim->src, cspace); - cache->func.constructor(eim, engine_data); - if (cache->func.debug) - cache->func.debug("cosntructor-colorspace-engine", eim); -} - -EAPI void -evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim) -{ - assert(eim); - assert(eim->cache); - - eim->flags.need_parent = 0; - evas_cache_image_data_not_needed(eim->src); -} diff --git a/libraries/evas/src/lib/cache/evas_cache_image.c b/libraries/evas/src/lib/cache/evas_cache_image.c deleted file mode 100644 index d5b72c5..0000000 --- a/libraries/evas/src/lib/cache/evas_cache_image.c +++ /dev/null @@ -1,1428 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_EVIL -# include -#endif - -#include "evas_common.h" -#include "evas_private.h" - -//#define CACHEDUMP 1 - -#ifdef EVAS_CSERVE -// FIXME: cache server and threaded preload clash badly atm - disable -//#undef BUILD_ASYNC_PRELOAD -#endif - -#ifdef BUILD_ASYNC_PRELOAD -typedef struct _Evas_Cache_Preload Evas_Cache_Preload; - -struct _Evas_Cache_Preload -{ - EINA_INLIST; - Image_Entry *ie; -}; - -static LK(engine_lock); -static LK(wakeup); -static int _evas_cache_mutex_init = 0; - -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; \ -} - -static void _evas_cache_image_dirty_add(Image_Entry *im); -static void _evas_cache_image_dirty_del(Image_Entry *im); -static void _evas_cache_image_activ_add(Image_Entry *im); -static void _evas_cache_image_activ_del(Image_Entry *im); -static void _evas_cache_image_lru_add(Image_Entry *im); -static void _evas_cache_image_lru_del(Image_Entry *im); -static void _evas_cache_image_lru_nodata_add(Image_Entry *im); -static void _evas_cache_image_lru_nodata_del(Image_Entry *im); - -static void -_evas_cache_image_dirty_add(Image_Entry *im) -{ - if (im->flags.dirty) return; - _evas_cache_image_activ_del(im); - _evas_cache_image_lru_del(im); - _evas_cache_image_lru_nodata_del(im); - im->flags.dirty = 1; - im->flags.cached = 1; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - im->cache->dirty = eina_inlist_prepend(im->cache->dirty, EINA_INLIST_GET(im)); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif - if (im->cache_key) - { - eina_stringshare_del(im->cache_key); - im->cache_key = NULL; - } -} - -static void -_evas_cache_image_dirty_del(Image_Entry *im) -{ - if (!im->flags.dirty) return; - im->flags.dirty = 0; - im->flags.cached = 0; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im)); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_activ_add(Image_Entry *im) -{ - if (im->flags.activ) return; - _evas_cache_image_dirty_del(im); - _evas_cache_image_lru_del(im); - _evas_cache_image_lru_nodata_del(im); - if (!im->cache_key) return; - im->flags.activ = 1; - im->flags.cached = 1; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - eina_hash_direct_add(im->cache->activ, im->cache_key, im); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_activ_del(Image_Entry *im) -{ - if (!im->flags.activ) return; - if (!im->cache_key) return; - im->flags.activ = 0; - im->flags.cached = 0; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - eina_hash_del(im->cache->activ, im->cache_key, im); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_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); - if (!im->cache_key) return; - im->flags.lru = 1; - im->flags.cached = 1; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - eina_hash_direct_add(im->cache->inactiv, im->cache_key, im); - im->cache->lru = eina_inlist_prepend(im->cache->lru, EINA_INLIST_GET(im)); - im->cache->usage += im->cache->func.mem_size_get(im); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_lru_del(Image_Entry *im) -{ - if (!im->flags.lru) return; - if (!im->cache_key) return; - im->flags.lru = 0; - im->flags.cached = 0; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - eina_hash_del(im->cache->inactiv, im->cache_key, im); - im->cache->lru = eina_inlist_remove(im->cache->lru, EINA_INLIST_GET(im)); - im->cache->usage -= im->cache->func.mem_size_get(im); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_lru_nodata_add(Image_Entry *im) -{ - if (im->flags.lru_nodata) return; - _evas_cache_image_dirty_del(im); - _evas_cache_image_activ_del(im); - _evas_cache_image_lru_del(im); - im->flags.lru = 1; - im->flags.cached = 1; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - im->cache->lru_nodata = eina_inlist_prepend(im->cache->lru_nodata, EINA_INLIST_GET(im)); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_lru_nodata_del(Image_Entry *im) -{ - if (!im->flags.lru_nodata) return; - im->flags.lru = 0; - im->flags.cached = 0; -#ifdef EVAS_FRAME_QUEUING - LKL(im->cache->lock); -#endif - im->cache->lru_nodata = eina_inlist_remove(im->cache->lru_nodata, EINA_INLIST_GET(im)); -#ifdef EVAS_FRAME_QUEUING - LKU(im->cache->lock); -#endif -} - -static void -_evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) -{ - if (!ie) return; - if (cache->func.debug) cache->func.debug("deleting", ie); -#ifdef BUILD_ASYNC_PRELOAD - if (ie->flags.delete_me == 1) return; - if (ie->preload) - { - ie->flags.delete_me = 1; - _evas_cache_image_entry_preload_remove(ie, NULL); - return; - } -#endif - - _evas_cache_image_dirty_del(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); - FREESTRC(ie->key); - ie->cache = NULL; - cache->func.surface_delete(ie); - -#ifdef BUILD_ASYNC_PRELOAD - LKD(ie->lock); - LKD(ie->lock_cancel); -#endif -#ifdef EVAS_FRAME_QUEUING - LKD(ie->lock_references); -#endif - cache->func.dealloc(ie); -} - -static Eina_Bool -_timestamp_compare(Image_Timestamp *tstamp, struct stat *st) -{ - if (tstamp->mtime != st->st_mtime) return EINA_FALSE; - if (tstamp->size != st->st_size) return EINA_FALSE; - if (tstamp->ino != st->st_ino) return EINA_FALSE; -#ifdef _STAT_VER_LINUX -#if (defined __USE_MISC && defined st_mtime) - if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec) - return EINA_FALSE; -#else - if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec) - return EINA_FALSE; -#endif -#endif - return EINA_TRUE; -} - -static void -_timestamp_build(Image_Timestamp *tstamp, struct stat *st) -{ - tstamp->mtime = st->st_mtime; - tstamp->size = st->st_size; - tstamp->ino = st->st_ino; -#ifdef _STAT_VER_LINUX -#if (defined __USE_MISC && defined st_mtime) - tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec; -#else - tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec; -#endif -#endif -} - -static Image_Entry * -_evas_cache_image_entry_new(Evas_Cache_Image *cache, - const char *hkey, - Image_Timestamp *tstamp, - const char *file, - const char *key, - RGBA_Image_Loadopts *lo, - int *error) -{ - Image_Entry *ie; - - ie = cache->func.alloc(); - if (!ie) - { - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return NULL; - } - ie->cache = cache; - if (hkey) ie->cache_key = eina_stringshare_add(hkey); - ie->flags.need_data = 1; - ie->space = EVAS_COLORSPACE_ARGB8888; - ie->w = -1; - ie->h = -1; - ie->scale = 1; - if (file) ie->file = eina_stringshare_add(file); - if (key) ie->key = eina_stringshare_add(key); - if (tstamp) ie->tstamp = *tstamp; - else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); - -#ifdef EVAS_FRAME_QUEUING - LKI(ie->lock_references); -#endif -#ifdef BUILD_ASYNC_PRELOAD - LKI(ie->lock); - LKI(ie->lock_cancel); -#endif - - if (lo) ie->load_opts = *lo; - if (ie->file) - { - *error = cache->func.constructor(ie); - if (*error != EVAS_LOAD_ERROR_NONE) - { - _evas_cache_image_entry_delete(cache, ie); - return NULL; - } - } - if (cache->func.debug) cache->func.debug("build", ie); - if (ie->cache_key) _evas_cache_image_activ_add(ie); - else _evas_cache_image_dirty_add(ie); - return ie; -} - -static void -_evas_cache_image_entry_surface_alloc__locked(Evas_Cache_Image *cache, - Image_Entry *ie, - unsigned int wmin, - unsigned int hmin) -{ - if ((ie->allocated.w == wmin) && (ie->allocated.h == hmin)) return; - if (cache->func.surface_alloc(ie, wmin, hmin)) - { - wmin = 0; - hmin = 0; - } - ie->w = wmin; - ie->h = hmin; - ie->allocated.w = wmin; - ie->allocated.h = hmin; -} - -static void -_evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache, - Image_Entry *ie, int w, int h) -{ - int wmin = w > 0 ? w : 1; - int hmin = h > 0 ? h : 1; -#ifdef BUILD_ASYNC_PRELOAD - LKL(engine_lock); -#endif - _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin); -#ifdef BUILD_ASYNC_PRELOAD - LKU(engine_lock); -#endif -} - -#ifdef BUILD_ASYNC_PRELOAD -static void -_evas_cache_image_async_heavy(void *data) -{ - Evas_Cache_Image *cache; - Image_Entry *current; - int error; - int pchannel; - - current = data; - - LKL(current->lock); - pchannel = current->channel; - current->channel++; - cache = current->cache; - - 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); - 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 = 1; - } - } - current->channel = pchannel; - // check the unload cancel flag - LKL(current->lock_cancel); - if (current->unload_cancel) - { - current->unload_cancel = EINA_FALSE; - cache->func.surface_delete(current); - current->flags.loaded = 0; - current->flags.preload_done = 0; - } - LKU(current->lock_cancel); - LKU(current->lock); -} - -static void -_evas_cache_image_async_end(void *data) -{ - Image_Entry *ie = (Image_Entry *)data; - Evas_Cache_Target *tmp; - - ie->cache->preload = eina_list_remove(ie->cache->preload, ie); - ie->cache->pending = eina_list_remove(ie->cache->pending, ie); - ie->preload = NULL; - 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), - EINA_INLIST_GET(ie->targets)); - free(tmp); - } -} - -static void -_evas_cache_image_async_cancel(void *data) -{ - Evas_Cache_Image *cache = NULL; - 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; - } - if (ie->flags.loaded) _evas_cache_image_async_end(ie); -#ifdef EVAS_FRAME_QUEUING - LKL(ie->lock_references); -#endif - if (ie->references == 0) - { - _evas_cache_image_lru_add(ie); - cache = ie->cache; - } -#ifdef EVAS_FRAME_QUEUING - LKU(ie->lock_references); -#endif - if (cache) evas_cache_image_flush(cache); -} - -// note - preload_add assumes a target is ONLY added ONCE to the image -// entry. make sure you only add once, or remove first, then add -static int -_evas_cache_image_entry_preload_add(Image_Entry *ie, const void *target) -{ - Evas_Cache_Target *tg; - - if (ie->flags.preload_done) return 0; - - tg = malloc(sizeof (Evas_Cache_Target)); - if (!tg) return 0; - - tg->target = target; - ie->targets = (Evas_Cache_Target *) - eina_inlist_append(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg)); - if (!ie->preload) - { - ie->cache->preload = eina_list_append(ie->cache->preload, ie); - ie->flags.pending = 0; - ie->preload = evas_preload_thread_run(_evas_cache_image_async_heavy, - _evas_cache_image_async_end, - _evas_cache_image_async_cancel, - ie); - } - return 1; -} - -static void -_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 *) - eina_inlist_remove(EINA_INLIST_GET(ie->targets), - EINA_INLIST_GET(tg)); - free(tg); - break; - } - } - } - else - { - Evas_Cache_Target *tg; - - 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); - } - } - - 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); - } -} -#endif - -EAPI int -evas_cache_image_usage_get(Evas_Cache_Image *cache) -{ - return cache->usage; -} - -EAPI int -evas_cache_image_get(Evas_Cache_Image *cache) -{ - return cache->limit; -} - -EAPI void -evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit) -{ -#ifdef EVAS_FRAME_QUEUING - LKL(cache->lock); -#endif - if (cache->limit == limit) - { -#ifdef EVAS_FRAME_QUEUING - LKU(cache->lock); -#endif - return; - } - cache->limit = limit; -#ifdef EVAS_FRAME_QUEUING - LKU(cache->lock); -#endif - evas_cache_image_flush(cache); -} - -EAPI Evas_Cache_Image * -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; - cache->inactiv = eina_hash_string_superfast_new(NULL); - cache->activ = eina_hash_string_superfast_new(NULL); - cache->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKI(cache->lock); -#endif - return cache; -} - -static Eina_Bool -_evas_cache_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) -{ - Eina_List **delete_list = fdata; - *delete_list = eina_list_prepend(*delete_list, data); - return EINA_TRUE; -} - -EAPI void -evas_cache_image_shutdown(Evas_Cache_Image *cache) -{ - Eina_List *delete_list; - Image_Entry *im; - -#ifdef EVAS_FRAME_QUEUING - LKL(cache->lock); -#endif - cache->references--; - if (cache->references != 0) - { -#ifdef EVAS_FRAME_QUEUING - LKU(cache->lock); -#endif - 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 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; - _evas_cache_image_entry_delete(cache, im); - } - while (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; - _evas_cache_image_entry_delete(cache, im); - } - delete_list = NULL; - eina_hash_foreach(cache->activ, _evas_cache_image_free_cb, &delete_list); - while (delete_list) - { - _evas_cache_image_entry_delete(cache, eina_list_data_get(delete_list)); - delete_list = eina_list_remove_list(delete_list, delete_list); - } - -#ifdef BUILD_ASYNC_PRELOAD - /* Now wait for all pending image to die */ - while (cache->pending) - { - 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); - 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, - 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, 0, 0 }, EINA_FALSE }; - size_t size; - int stat_done = 0, stat_failed = 0; - size_t file_length; - size_t key_length; - struct stat st; - Image_Timestamp tstamp; - - if ((!file) || ((!file) && (!key))) - { - *error = EVAS_LOAD_ERROR_GENERIC; - return NULL; - } - - /* generate hkey from file+key+load opts */ - file_length = strlen(file); - key_length = key ? strlen(key) : 6; - size = file_length + key_length + 132; - hkey = alloca(sizeof (char) * size); - memcpy(hkey, file, file_length); - size = file_length; - memcpy(hkey + size, "//://", 5); - size += 5; - if (key) ckey = key; - memcpy(hkey + size, ckey, key_length); - size += key_length; - if ((!lo) || - (lo && - (lo->scale_down_by == 0) && - (lo->dpi == 0.0) && - ((lo->w == 0) || (lo->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); - - if (lo->orientation) - { - hkey[size] = '/'; - size += 1; - hkey[size] = 'o'; - size += 1; - } - } - hkey[size] = '\0'; - - /* find image by key in active hash */ -#ifdef EVAS_FRAME_QUEUING - LKL(cache->lock); -#endif - im = eina_hash_find(cache->activ, hkey); -#ifdef EVAS_FRAME_QUEUING - LKU(cache->lock); -#endif - if (im) - { - int ok = 1; - - 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) - * so dirty the active cache entry so we never find it again. this - * also implicitly guarantees that we only have 1 active copy - * of an image at a given key. we wither find it and keep re-reffing - * it or we dirty it and get it out */ - _evas_cache_image_dirty_add(im); - im = NULL; - } - - /* find image by key in inactive/lru hash */ -#ifdef EVAS_FRAME_QUEUING - LKL(cache->lock); -#endif - im = eina_hash_find(cache->inactiv, hkey); -#ifdef EVAS_FRAME_QUEUING - LKU(cache->lock); -#endif - if (im) - { - int ok = 1; - - if (!stat_done) - { - stat_done = 1; - if (stat(file, &st) < 0) - { - stat_failed = 1; - ok = 0; - } - else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; - } - else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; - - if (ok) - { - /* remove from lru and make it active again */ - _evas_cache_image_lru_del(im); - _evas_cache_image_activ_add(im); - goto on_ok; - } - /* as avtive cache find - if we match in lru and its invalid, dirty */ - _evas_cache_image_dirty_add(im); - /* this image never used, so it have to be deleted */ - _evas_cache_image_entry_delete(cache, im); - 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, - lo, error); - if (!im) goto on_stat_error; - if (cache->func.debug) cache->func.debug("request", im); - -on_ok: - *error = EVAS_LOAD_ERROR_NONE; -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - im->references++; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - return im; - -on_stat_error: -#ifndef _WIN32 - if ((errno == ENOENT) || (errno == ENOTDIR) || - (errno == ENAMETOOLONG) || (errno == ELOOP)) -#else - if (errno == ENOENT) -#endif - *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; -#ifndef _WIN32 - else if ((errno == ENOMEM) || (errno == EOVERFLOW)) -#else - else if (errno == ENOMEM) -#endif - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - else if (errno == EACCES) - *error = EVAS_LOAD_ERROR_PERMISSION_DENIED; - else - *error = EVAS_LOAD_ERROR_GENERIC; - - if (im) _evas_cache_image_entry_delete(cache, im); - return NULL; -} - -EAPI void -evas_cache_image_drop(Image_Entry *im) -{ - Evas_Cache_Image *cache; - int references; - -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - im->references--; - if (im->references < 0) im->references = 0; - references = im->references; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - - cache = im->cache; - - if (references == 0) - { -#ifdef EVAS_FRAME_QUEUING - LKL(im->ref_fq_add); - LKL(im->ref_fq_del); - if (im->ref_fq[0] != im->ref_fq[1]) - { - LKU(im->ref_fq_add); - LKU(im->ref_fq_del); - return; - } - LKU(im->ref_fq_add); - LKU(im->ref_fq_del); -#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; - } - _evas_cache_image_lru_add(im); - if (cache) evas_cache_image_flush(cache); - } -} - -EAPI void -evas_cache_image_data_not_needed(Image_Entry *im) -{ - int references; - -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - references = im->references; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - if (references > 1) return; - if ((im->flags.dirty) || (!im->flags.need_data)) return; - _evas_cache_image_lru_nodata_add(im); -} - -EAPI Image_Entry * -evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h) -{ - Image_Entry *im_dirty = im; - Evas_Cache_Image *cache; - - cache = im->cache; - if (!(im->flags.dirty)) - { -#ifndef EVAS_CSERVE - int references; -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - references = im->references; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - // if ref 1 also copy if using shared cache as its read-only - if (references == 1) im_dirty = im; - else -#endif - { - 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); - 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); -#endif - im_dirty->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im_dirty->lock_references); -#endif - evas_cache_image_drop(im); - } - _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); - return im_dirty; - -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_alone(Image_Entry *im) -{ - Evas_Cache_Image *cache; - Image_Entry *im_dirty = im; - int references; - - cache = im->cache; -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - references = im->references; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - - if (references <= 1) - { - if (!im->flags.dirty) _evas_cache_image_dirty_add(im); - } - else - { - 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); - 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); -#endif - im_dirty->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im_dirty->lock_references); -#endif - evas_cache_image_drop(im); - } - return im_dirty; - -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, - DATA32 *image_data, int alpha, int cspace) -{ - Image_Entry *im; - - if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) || - (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) || - (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) - w &= ~0x1; - - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); - if (!im) return NULL; - im->space = cspace; - im->flags.alpha = alpha; - _evas_cache_image_entry_surface_alloc(cache, im, w, h); - if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0) - { - _evas_cache_image_entry_delete(cache, im); - return NULL; - } -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - im->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - if (cache->func.debug) cache->func.debug("copied-data", im); - return im; -} - -EAPI Image_Entry * -evas_cache_image_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) || - (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) - w &= ~0x1; - - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); - if (!im) return NULL; - im->w = w; - im->h = h; - im->flags.alpha = alpha; - if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) - { - _evas_cache_image_entry_delete(cache, im); - return NULL; - } -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - im->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - if (cache->func.debug) cache->func.debug("data", im); - return im; -} - -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) || - (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) - w &= ~0x1; - - _evas_cache_image_entry_surface_alloc(cache, im, w, h); - if (cache->func.debug) cache->func.debug("surface-alloc", im); -} - -EAPI Image_Entry * -evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) -{ - Evas_Cache_Image *cache; - Image_Entry *im2 = NULL; - int error; - - if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) || - (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) || - (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) - w &= ~0x1; - if ((im->w == w) && (im->h == h)) return im; - - cache = im->cache; - im2 = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, &error); - if (!im2) goto on_error; - - im2->flags.alpha = im->flags.alpha; - im2->space = im->space; - im2->load_opts = im->load_opts; - _evas_cache_image_entry_surface_alloc(cache, im2, w, h); - error = cache->func.size_set(im2, im, w, h); - if (error != 0) goto on_error; -#ifdef EVAS_FRAME_QUEUING - LKL(im2->lock_references); -#endif - im2->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im2->lock_references); -#endif - evas_cache_image_drop(im); - if (cache->func.debug) cache->func.debug("size_set", im2); - return im2; - -on_error: - if (im2) _evas_cache_image_entry_delete(cache, im2); - evas_cache_image_drop(im); - return NULL; -} - -EAPI int -evas_cache_image_load_data(Image_Entry *im) -{ -#ifdef BUILD_ASYNC_PRELOAD - Eina_Bool preload = EINA_FALSE; -#endif - int error = EVAS_LOAD_ERROR_NONE; - - if ((im->flags.loaded) && (!im->flags.animated)) 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) - { - eina_condition_wait(&cond_wakeup); - LKU(wakeup); - evas_async_events_process(); - LKL(wakeup); - } - LKU(wakeup); - } - - if ((im->flags.loaded) && (!im->flags.animated)) return error; - LKL(im->lock); -#endif - im->flags.in_progress = EINA_TRUE; - error = im->cache->func.load(im); - im->flags.in_progress = EINA_FALSE; -#ifdef BUILD_ASYNC_PRELOAD - LKU(im->lock); -#endif - im->flags.loaded = 1; - if (im->cache->func.debug) im->cache->func.debug("load", im); - if (error != EVAS_LOAD_ERROR_NONE) - { - _evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h); - im->flags.loaded = 0; - } -#ifdef BUILD_ASYNC_PRELOAD - if (preload) _evas_cache_image_async_end(im); -#endif - return error; -} - -EAPI void -evas_cache_image_unload_data(Image_Entry *im) -{ - if (im->flags.in_progress) return; - evas_cache_image_preload_cancel(im, NULL); -#ifdef BUILD_ASYNC_PRELOAD - LKL(im->lock_cancel); - if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */ - { - im->unload_cancel = EINA_TRUE; - LKU(im->lock_cancel); - return; - } - LKU(im->lock_cancel); -#endif - if ((!im->flags.loaded) || (!im->file) || (!im->info.module) || - (im->flags.dirty)) - { -#ifdef BUILD_ASYNC_PRELOAD - LKU(im->lock); -#endif - return; - } - im->cache->func.destructor(im); -#ifdef BUILD_ASYNC_PRELOAD - LKU(im->lock); -#endif - //FIXME: imagedataunload - inform owners -} - -static Eina_Bool -_evas_cache_image_unload_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, __UNUSED__ void *fdata) -{ - evas_cache_image_unload_data(data); - return EINA_TRUE; -} - -EAPI void -evas_cache_image_unload_all(Evas_Cache_Image *cache) -{ - Image_Entry *im; - - EINA_INLIST_FOREACH(cache->lru, im) evas_cache_image_unload_data(im); - EINA_INLIST_FOREACH(cache->lru_nodata, im) evas_cache_image_unload_data(im); - eina_hash_foreach(cache->activ, _evas_cache_image_unload_cb, NULL); - eina_hash_foreach(cache->inactiv, _evas_cache_image_unload_cb, NULL); -} - -EAPI Eina_Bool -evas_cache_image_is_loaded(Image_Entry *im) -{ - if (im->flags.loaded) return EINA_TRUE; - return EINA_FALSE; -} - -EAPI void -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); - return; - } - im->flags.loaded = 0; - if (!_evas_cache_image_entry_preload_add(im, 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); -#endif -} - -EAPI void -evas_cache_image_preload_cancel(Image_Entry *im, const void *target) -{ -#ifdef BUILD_ASYNC_PRELOAD - if (!target) return; - _evas_cache_image_entry_preload_remove(im, target); -#else - (void)im; - (void)target; -#endif -} - -#ifdef CACHEDUMP -static int total = 0; - -static void -_dump_img(Image_Entry *im, const char *type) -{ - total += im->cache->func.mem_size_get(im); - printf("%s: %4i: %4ib, %4ix%4i alloc[%4ix%4i] [%s] [%s]\n", - type, - im->references, - im->cache->func.mem_size_get(im), - im->w, im->h, im->allocated.w, im->allocated.h, - im->file, im->key); -} - -static Eina_Bool -_dump_cache_active(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata __UNUSED__) -{ - Image_Entry *im = data; - _dump_img(im, "ACTIVE"); - return EINA_TRUE; -} - -static void -_dump_cache(Evas_Cache_Image *cache) -{ - Image_Entry *im; - - printf("--CACHE DUMP----------------------------------------------------\n"); - printf("cache: %ikb / %ikb\n", - cache->usage / 1024, - cache->limit / 1024); - printf("................................................................\n"); - total = 0; - EINA_INLIST_FOREACH(cache->lru_nodata, im) - _dump_img(im, "NODATA"); - EINA_INLIST_FOREACH(cache->lru, im) - _dump_img(im, "DATA "); - printf("tot: %i\n" - "usg: %i\n", - total, - cache->usage); - eina_hash_foreach(cache->activ, _dump_cache_active, NULL); -} -#endif - -EAPI int -evas_cache_image_flush(Evas_Cache_Image *cache) -{ -#ifdef CACHEDUMP - _dump_cache(cache); -#endif - if (cache->limit == (unsigned int)-1) return -1; - - 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); - im->flags.loaded = 0; - } - - return cache->usage; -} - -EAPI Image_Entry * -evas_cache_image_empty(Evas_Cache_Image *cache) -{ - Image_Entry *im; - - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); - if (!im) return NULL; -#ifdef EVAS_FRAME_QUEUING - LKL(im->lock_references); -#endif - im->references = 1; -#ifdef EVAS_FRAME_QUEUING - LKU(im->lock_references); -#endif - return im; -} - -EAPI void -evas_cache_image_colorspace(Image_Entry *im, int cspace) -{ - if (im->space == cspace) return; - im->space = cspace; - im->cache->func.color_space(im, cspace); -} - -EAPI void * -evas_cache_private_from_image_entry_get(Image_Entry *im) -{ - return (void *)im->cache->data; -} - -EAPI void * -evas_cache_private_get(Evas_Cache_Image *cache) -{ - return cache->data; -} - -EAPI void -evas_cache_private_set(Evas_Cache_Image *cache, const void *data) -{ - cache->data = (void *)data; -} - -EAPI DATA32 * -evas_cache_image_pixels(Image_Entry *im) -{ - return im->cache->func.surface_pixels(im); -} - -EAPI void -evas_cache_image_wakeup(void) -{ -#ifdef BUILD_ASYNC_PRELOAD - if (_evas_cache_mutex_init > 0) - eina_condition_broadcast(&cond_wakeup); -#endif -} diff --git a/libraries/evas/src/lib/cache/evas_preload.c b/libraries/evas/src/lib/cache/evas_preload.c deleted file mode 100644 index 5eebaed..0000000 --- a/libraries/evas/src/lib/cache/evas_preload.c +++ /dev/null @@ -1,266 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_EVIL -# include -#endif - -#ifdef BUILD_ASYNC_PRELOAD -# include -# ifdef __linux__ -# include -# endif -#endif - -#include "evas_common.h" -#include "evas_private.h" -#include "Evas.h" - -#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; - -typedef void (*_evas_preload_pthread_func)(void *data); - -struct _Evas_Preload_Pthread_Worker -{ - EINA_INLIST; - - _evas_preload_pthread_func func_heavy; - _evas_preload_pthread_func func_end; - _evas_preload_pthread_func func_cancel; - void *data; - Eina_Bool cancel : 1; -}; - -struct _Evas_Preload_Pthread_Data -{ - pthread_t thread; -}; - -static int _threads_count = 0; -static Evas_Preload_Pthread_Worker *_workers = NULL; - -static LK(_mutex); - -static void -_evas_preload_thread_end(void *data) -{ - Evas_Preload_Pthread_Data *pth = data; - Evas_Preload_Pthread_Data *p = NULL; - - if (pthread_join(pth->thread, (void **)&p) == 0) free(p); - else return; - eina_threads_shutdown(); -} - -static void -_evas_preload_thread_done(void *target __UNUSED__, Evas_Callback_Type type __UNUSED__, void *event_info) -{ - Evas_Preload_Pthread_Worker *work = event_info; - if (work->cancel) - { - if (work->func_cancel) work->func_cancel(work->data); - } - else - work->func_end(work->data); - - free(work); -} - -static void * -_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); -on_error: - for (;;) - { - LKL(_mutex); - if (!_workers) - { - LKU(_mutex); - break; - } - - work = _workers; - _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), - EINA_INLIST_GET(_workers)), - Evas_Preload_Pthread_Worker); - LKU(_mutex); - - if (work->func_heavy) work->func_heavy(work->data); - evas_async_events_put(pth, 0, work, _evas_preload_thread_done); - } - - LKL(_mutex); - if (_workers) - { - LKU(_mutex); - goto on_error; - } - _threads_count--; - LKU(_mutex); - - // dummy worker to wake things up - work = malloc(sizeof(Evas_Preload_Pthread_Worker)); - if (!work) return NULL; - - work->data = pth; - work->func_heavy = NULL; - work->func_end = (_evas_preload_pthread_func) _evas_preload_thread_end; - work->func_cancel = NULL; - work->cancel = EINA_FALSE; - - evas_async_events_put(pth, 0, work, _evas_preload_thread_done); - return pth; -} -#endif - -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 -_evas_preload_thread_shutdown(void) -{ - /* FIXME: If function are still running in the background, should we kill them ? */ -#ifdef BUILD_ASYNC_PRELOAD - Evas_Preload_Pthread_Worker *work; - - /* Force processing of async events. */ - evas_async_events_process(); - LKL(_mutex); - while (_workers) - { - work = _workers; - _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), - EINA_INLIST_GET(_workers)), - Evas_Preload_Pthread_Worker); - if (work->func_cancel) work->func_cancel(work->data); - free(work); - } - LKU(_mutex); - - LKD(_mutex); -#endif -} - -Evas_Preload_Pthread * -evas_preload_thread_run(void (*func_heavy) (void *data), - void (*func_end) (void *data), - void (*func_cancel) (void *data), - const void *data) -{ -#ifdef BUILD_ASYNC_PRELOAD - Evas_Preload_Pthread_Worker *work; - Evas_Preload_Pthread_Data *pth; - - work = malloc(sizeof(Evas_Preload_Pthread_Worker)); - if (!work) - { - func_cancel((void *)data); - return NULL; - } - - work->func_heavy = func_heavy; - work->func_end = func_end; - work->func_cancel = func_cancel; - work->cancel = EINA_FALSE; - work->data = (void *)data; - - LKL(_mutex); - _workers = (Evas_Preload_Pthread_Worker *)eina_inlist_append(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work)); - if (_threads_count == _threads_max) - { - LKU(_mutex); - return (Evas_Preload_Pthread *)work; - } - LKU(_mutex); - - /* 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); - _threads_count++; - LKU(_mutex); - return (Evas_Preload_Pthread*)work; - } - - eina_threads_shutdown(); - - on_error: - LKL(_mutex); - if (_threads_count == 0) - { - LKU(_mutex); - if (work->func_cancel) work->func_cancel(work->data); - free(work); - return NULL; - } - LKU(_mutex); - return NULL; -#else - /* - If no thread and as we don't want to break app that rely on this - facility, we will lock the interface until we are done. - */ - (void)func_cancel; - func_heavy((void *)data); - func_end((void *)data); - return (void *)1; -#endif -} - -Eina_Bool -evas_preload_thread_cancel(Evas_Preload_Pthread *thread) -{ -#ifdef BUILD_ASYNC_PRELOAD - Evas_Preload_Pthread_Worker *work; - - if (!thread) return EINA_TRUE; - LKL(_mutex); - EINA_INLIST_FOREACH(_workers, work) - { - if (work == (Evas_Preload_Pthread_Worker *)thread) - { - _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), - EINA_INLIST_GET(work)), - Evas_Preload_Pthread_Worker); - LKU(_mutex); - if (work->func_cancel) work->func_cancel(work->data); - free(work); - return EINA_TRUE; - } - } - LKU(_mutex); - - /* Delay the destruction */ - work = (Evas_Preload_Pthread_Worker *)thread; - work->cancel = EINA_TRUE; - return EINA_FALSE; -#else - (void) thread; - return EINA_TRUE; -#endif -} diff --git a/libraries/evas/src/lib/canvas/Makefile.am b/libraries/evas/src/lib/canvas/Makefile.am deleted file mode 100644 index e302668..0000000 --- a/libraries/evas/src/lib/canvas/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --I$(top_srcdir)/src/lib/cserve \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@FREETYPE_CFLAGS@ \ -@EET_CFLAGS@ \ -@FONTCONFIG_CFLAGS@ \ -@EVAS_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EVIL_CFLAGS@ \ -@PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_canvas.la -libevas_canvas_la_SOURCES = \ -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 \ -evas_layer.c \ -evas_main.c \ -evas_name.c \ -evas_object_image.c \ -evas_object_main.c \ -evas_object_inform.c \ -evas_object_intercept.c \ -evas_object_line.c \ -evas_object_polygon.c \ -evas_object_rectangle.c \ -evas_object_smart.c \ -evas_object_smart_clipped.c \ -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_stats.c \ -evas_touch_point.c \ -evas_map.c \ -evas_gl.c - -#evas_object_textgrid.c - -libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ - -if EVAS_USE_LINEBREAK -AM_CPPFLAGS += @LINEBREAK_CFLAGS@ -libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@ -endif - -clean-local: - rm -rf *.gcno diff --git a/libraries/evas/src/lib/canvas/Makefile.in b/libraries/evas/src/lib/canvas/Makefile.in deleted file mode 100644 index c7e48bc..0000000 --- a/libraries/evas/src/lib/canvas/Makefile.in +++ /dev/null @@ -1,763 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@EVAS_USE_LINEBREAK_TRUE@am__append_1 = @LINEBREAK_CFLAGS@ -@EVAS_USE_LINEBREAK_TRUE@am__append_2 = @LINEBREAK_LIBS@ -subdir = src/lib/canvas -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libevas_canvas_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libevas_canvas_la_OBJECTS = evas_callbacks.lo evas_clip.lo \ - evas_data.lo evas_events.lo evas_filter.lo evas_focus.lo \ - evas_key.lo evas_key_grab.lo evas_layer.lo evas_main.lo \ - evas_name.lo evas_object_image.lo evas_object_main.lo \ - evas_object_inform.lo evas_object_intercept.lo \ - evas_object_line.lo evas_object_polygon.lo \ - evas_object_rectangle.lo evas_object_smart.lo \ - evas_object_smart_clipped.lo evas_object_box.lo \ - evas_object_table.lo evas_object_text.lo \ - evas_object_textblock.lo evas_object_grid.lo evas_font_dir.lo \ - evas_rectangle.lo evas_render.lo evas_smart.lo evas_stack.lo \ - evas_async_events.lo evas_stats.lo evas_touch_point.lo \ - evas_map.lo evas_gl.lo -libevas_canvas_la_OBJECTS = $(am_libevas_canvas_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_canvas_la_SOURCES) -DIST_SOURCES = $(libevas_canvas_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ - -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \ - -DPACKAGE_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_LIB_DIR=\"$(libdir)\" \ - -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @FREETYPE_CFLAGS@ \ - @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ @EVAS_CFLAGS@ @EINA_CFLAGS@ \ - @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ $(am__append_1) -noinst_LTLIBRARIES = libevas_canvas.la -libevas_canvas_la_SOURCES = \ -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 \ -evas_layer.c \ -evas_main.c \ -evas_name.c \ -evas_object_image.c \ -evas_object_main.c \ -evas_object_inform.c \ -evas_object_intercept.c \ -evas_object_line.c \ -evas_object_polygon.c \ -evas_object_rectangle.c \ -evas_object_smart.c \ -evas_object_smart_clipped.c \ -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_stats.c \ -evas_touch_point.c \ -evas_map.c \ -evas_gl.c - - -#evas_object_textgrid.c -libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/canvas/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/canvas/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_canvas.la: $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_async_events.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_callbacks.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_clip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_events.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_filter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_focus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_dir.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key_grab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_layer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_name.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_box.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_grid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_image.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_inform.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_intercept.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_line.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_polygon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_rectangle.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart_clipped.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_table.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_textblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_render.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_smart.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stack.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stats.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_touch_point.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local clean-noinstLTLIBRARIES ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am - - -clean-local: - rm -rf *.gcno - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/canvas/evas_async_events.c b/libraries/evas/src/lib/canvas/evas_async_events.c deleted file mode 100644 index bd2e3a8..0000000 --- a/libraries/evas/src/lib/canvas/evas_async_events.c +++ /dev/null @@ -1,173 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef BUILD_ASYNC_EVENTS - -# ifndef _MSC_VER -# include -# endif -# include -# include - -#endif - -#include "evas_common.h" -#include "evas_private.h" - -#ifdef BUILD_ASYNC_EVENTS - -static int _fd_write = -1; -static int _fd_read = -1; - -static int _init_evas_event = 0; - -typedef struct _Evas_Event_Async Evas_Event_Async; - -struct _Evas_Event_Async -{ - const void *target; - void *event_info; - Evas_Async_Events_Put_Cb func; - Evas_Callback_Type type; -}; - -int -evas_async_events_init(void) -{ - int filedes[2]; - - _init_evas_event++; - if (_init_evas_event > 1) return _init_evas_event; - - if (pipe(filedes) == -1) - { - _init_evas_event = 0; - return 0; - } - - _fd_read = filedes[0]; - _fd_write = filedes[1]; - - fcntl(_fd_read, F_SETFL, O_NONBLOCK); - - return _init_evas_event; -} - -int -evas_async_events_shutdown(void) -{ - _init_evas_event--; - if (_init_evas_event > 0) return _init_evas_event; - - close(_fd_read); - close(_fd_write); - _fd_read = -1; - _fd_write = -1; - - return _init_evas_event; -} - -#endif - -EAPI int -evas_async_events_fd_get(void) -{ -#ifdef BUILD_ASYNC_EVENTS - return _fd_read; -#else - return -1; -#endif -} - -EAPI int -evas_async_events_process(void) -{ -#ifdef BUILD_ASYNC_EVENTS - Evas_Event_Async *ev; - int check; - int count = 0; - - if (_fd_read == -1) return 0; - - do - { - check = read(_fd_read, &ev, sizeof (Evas_Event_Async *)); - - if (check == sizeof (Evas_Event_Async *)) - { - if (ev->func) ev->func((void *)ev->target, ev->type, ev->event_info); - free(ev); - count++; - } - } - while (check > 0); - - evas_cache_image_wakeup(); - - if (check < 0) - { - switch (errno) - { - case EBADF: - case EINVAL: - case EIO: - case EISDIR: - _fd_read = -1; - } - } - - return count; -#else - return 0; -#endif -} - -EAPI Eina_Bool -evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) -{ -#ifdef BUILD_ASYNC_EVENTS - Evas_Event_Async *ev; - ssize_t check; - Eina_Bool result = EINA_FALSE; - - if (!func) return 0; - if (_fd_write == -1) return 0; - - ev = calloc(1, sizeof (Evas_Event_Async)); - if (!ev) return 0; - - ev->func = func; - ev->target = target; - ev->type = type; - ev->event_info = event_info; - - do - { - check = write(_fd_write, &ev, sizeof (Evas_Event_Async*)); - } - while ((check != sizeof (Evas_Event_Async*)) && - ((errno == EINTR) || (errno == EAGAIN))); - - evas_cache_image_wakeup(); - - if (check == sizeof (Evas_Event_Async*)) - result = EINA_TRUE; - else - { - switch (errno) - { - case EBADF: - case EINVAL: - case EIO: - case EPIPE: - _fd_write = -1; - } - } - - return result; -#else - func((void*) target, type, event_info); - return EINA_TRUE; -#endif -} diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c deleted file mode 100644 index 47cfb0c..0000000 --- a/libraries/evas/src/lib/canvas/evas_callbacks.c +++ /dev/null @@ -1,543 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -static void evas_object_event_callback_clear(Evas_Object *obj); -static void evas_event_callback_clear(Evas *e); -int _evas_event_counter = 0; - -EVAS_MEMPOOL(_mp_fn); -EVAS_MEMPOOL(_mp_cb); -EVAS_MEMPOOL(_mp_pc); - -void -_evas_post_event_callback_call(Evas *e) -{ - Evas_Post_Callback *pc; - int skip = 0; - - if (e->delete_me) return; - _evas_walk(e); - EINA_LIST_FREE(e->post_events, pc) - { - if ((!skip) && (!e->delete_me) && (!pc->delete_me)) - { - if (!pc->func((void*)pc->data, e)) skip = 1; - } - EVAS_MEMPOOL_FREE(_mp_pc, pc); - } - _evas_unwalk(e); -} - -void -_evas_post_event_callback_free(Evas *e) -{ - Evas_Post_Callback *pc; - - EINA_LIST_FREE(e->post_events, pc) - { - EVAS_MEMPOOL_FREE(_mp_pc, pc); - } - _evas_unwalk(e); -} - -void -evas_event_callback_list_post_free(Eina_Inlist **list) -{ - Eina_Inlist *l; - - /* MEM OK */ - for (l = *list; l;) - { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - l = l->next; - if (fn->delete_me) - { - *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); - EVAS_MEMPOOL_FREE(_mp_fn, fn); - } - } -} - -static void -evas_object_event_callback_clear(Evas_Object *obj) -{ - if (!obj->callbacks) return; - if (!obj->callbacks->deletions_waiting) return; - obj->callbacks->deletions_waiting = 0; - evas_event_callback_list_post_free(&obj->callbacks->callbacks); - if (!obj->callbacks->callbacks) - { - EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); - obj->callbacks = NULL; - } -} - -static void -evas_event_callback_clear(Evas *e) -{ - if (!e->callbacks) return; - if (!e->callbacks->deletions_waiting) return; - e->callbacks->deletions_waiting = 0; - evas_event_callback_list_post_free(&e->callbacks->callbacks); - if (!e->callbacks->callbacks) - { - EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); - e->callbacks = NULL; - } -} - -void -evas_object_event_callback_all_del(Evas_Object *obj) -{ - Evas_Func_Node *fn; - - if (!obj->callbacks) return; - EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) - fn->delete_me = 1; -} - -void -evas_object_event_callback_cleanup(Evas_Object *obj) -{ - /* MEM OK */ - if (!obj->callbacks) return; - evas_event_callback_list_post_free(&obj->callbacks->callbacks); - EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); - obj->callbacks = NULL; -} - -void -evas_event_callback_all_del(Evas *e) -{ - Evas_Func_Node *fn; - - if (!e->callbacks) return; - EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) - fn->delete_me = 1; -} - -void -evas_event_callback_cleanup(Evas *e) -{ - /* MEM OK */ - if (!e->callbacks) return; - evas_event_callback_list_post_free(&e->callbacks->callbacks); - EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); - e->callbacks = NULL; -} - -void -evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) -{ - Eina_Inlist **l_mod = NULL, *l; - - _evas_walk(e); - if (e->callbacks) - { - l_mod = &e->callbacks->callbacks; - e->callbacks->walking_list++; - for (l = *l_mod; l; l = l->next) - { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Event_Cb func = fn->func; - if (func) - func(fn->data, e, event_info); - } - if (e->delete_me) break; - } - e->callbacks->walking_list--; - if (!e->callbacks->walking_list) - { - evas_event_callback_clear(e); - l_mod = NULL; - } - } - _evas_unwalk(e); -} - -void -evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) -{ - /* MEM OK */ - Eina_Inlist **l_mod = NULL, *l; - Evas_Button_Flags flags = EVAS_BUTTON_NONE; - Evas *e; - - if ((obj->delete_me) || (!obj->layer)) return; - if ((obj->last_event == event_id) && - (obj->last_event_type == type)) return; - if (obj->last_event > event_id) - { - if ((obj->last_event_type == EVAS_CALLBACK_MOUSE_OUT) && - ((type >= EVAS_CALLBACK_MOUSE_DOWN) && - (type <= EVAS_CALLBACK_MULTI_MOVE))) - { - return; - } - } - obj->last_event = event_id; - obj->last_event_type = type; - if (!(e = obj->layer->evas)) return; - - _evas_walk(e); - if (obj->callbacks) - { - l_mod = &obj->callbacks->callbacks; - switch (type) - { - case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_down_counter = e->last_mouse_down_counter; - break; - } - case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_up_counter = e->last_mouse_up_counter; - break; - } - default: - break; - } - obj->callbacks->walking_list++; - for (l = *l_mod; l; l = l->next) - { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Object_Event_Cb func = fn->func; - if (func) - func(fn->data, obj->layer->evas, obj, event_info); - } - if (obj->delete_me) break; - } - obj->callbacks->walking_list--; - if (!obj->callbacks->walking_list) - { - evas_object_event_callback_clear(obj); - l_mod = NULL; - } - - if (type == EVAS_CALLBACK_MOUSE_DOWN) - { - Evas_Event_Mouse_Down *ev = event_info; - ev->flags = flags; - } - else if (type == EVAS_CALLBACK_MOUSE_UP) - { - Evas_Event_Mouse_Up *ev = event_info; - ev->flags = flags; - } - } - - if (!((obj->no_propagate) && (l_mod) && (*l_mod))) - { - if (!obj->no_propagate) - { - if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && - (type <= EVAS_CALLBACK_KEY_UP)) - evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id); - } - } - _evas_unwalk(e); -} - -static int -_callback_priority_cmp(const void *_a, const void *_b) -{ - const Evas_Func_Node *a, *b; - a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); - b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); - if (a->priority < b->priority) - return -1; - else - return 1; -} - -EAPI void -evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) -{ - evas_object_event_callback_priority_add(obj, type, - EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); -} - -EAPI void -evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (!func) return; - - if (!obj->callbacks) - { - EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, ); - obj->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); - if (!obj->callbacks) return; - EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); - } - - EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); - fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); - if (!fn) return; - EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); - fn->func = func; - fn->data = (void *)data; - fn->type = type; - fn->priority = priority; - - obj->callbacks->callbacks = - eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), - _callback_priority_cmp); -} - -EAPI void * -evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - - if (!func) return NULL; - - if (!obj->callbacks) return NULL; - - EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) - { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } - } - return NULL; -} - -EAPI void * -evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - - if (!func) return NULL; - - if (!obj->callbacks) return NULL; - - EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) - { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } - } - return NULL; -} - -EAPI void -evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) -{ - evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, - func, data); -} - -EAPI void -evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (!func) return; - - if (!e->callbacks) - { - EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, ); - e->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); - if (!e->callbacks) return; - EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); - } - - EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); - fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); - if (!fn) return; - EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); - fn->func = func; - fn->data = (void *)data; - fn->type = type; - fn->priority = priority; - - e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, - EINA_INLIST_GET(fn), _callback_priority_cmp); -} - -EAPI void * -evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - - if (!func) return NULL; - - if (!e->callbacks) return NULL; - - EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) - { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *data; - - data = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return data; - } - } - return NULL; -} - -EAPI void * -evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) -{ - /* MEM OK */ - Evas_Func_Node *fn; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - - if (!func) return NULL; - - if (!e->callbacks) return NULL; - - EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) - { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return tmp; - } - } - return NULL; -} - -EAPI void -evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) -{ - Evas_Post_Callback *pc; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); - pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); - if (!pc) return; - EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); - if (e->delete_me) return; - - pc->func = func; - pc->data = data; - e->post_events = eina_list_prepend(e->post_events, pc); -} - -EAPI void -evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) -{ - Evas_Post_Callback *pc; - Eina_List *l; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - EINA_LIST_FOREACH(e->post_events, l, pc) - { - if (pc->func == func) - { - pc->delete_me = 1; - return; - } - } -} - -EAPI void -evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) -{ - Evas_Post_Callback *pc; - Eina_List *l; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - EINA_LIST_FOREACH(e->post_events, l, pc) - { - if ((pc->func == func) && (pc->data == data)) - { - pc->delete_me = 1; - return; - } - } -} diff --git a/libraries/evas/src/lib/canvas/evas_clip.c b/libraries/evas/src/lib/canvas/evas_clip.c deleted file mode 100644 index 1ae2f73..0000000 --- a/libraries/evas/src/lib/canvas/evas_clip.c +++ /dev/null @@ -1,321 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -void -evas_object_clip_dirty(Evas_Object *obj) -{ - Eina_List *l; - Evas_Object *data; - - if (obj->cur.cache.clip.dirty) return ; - - obj->cur.cache.clip.dirty = 1; - EINA_LIST_FOREACH(obj->clip.clipees, l, data) - evas_object_clip_dirty(data); -} - -void -evas_object_recalc_clippees(Evas_Object *obj) -{ - Eina_List *l; - Evas_Object *data; - - if (obj->cur.cache.clip.dirty) - { - evas_object_clip_recalc(obj); - EINA_LIST_FOREACH(obj->clip.clipees, l, data) - evas_object_recalc_clippees(data); - } -} - -int -evas_object_clippers_was_visible(Evas_Object *obj) -{ - if (obj->prev.visible) - { - if (obj->prev.clipper) - return evas_object_clippers_is_visible(obj->prev.clipper); - return 1; - } - return 0; -} - -/* aaaaargh (pirate voice) ... notes! - * - * we have a big problem until now that's gone undetected... until yesterday. - * that problem involves clips and maps and smart objects. hooray! 3 of the - * more complex bits of evas - and maps and smart objects being one of the - * nastiest ones. - * - * what is the problem? when a clip crosses a map boundary. that is to say - * that when the clipper and clippee are not within the child tree of the - * mapped object. in this case "bad stuff" happens. basically as clips are - * then used to render objects, but they no longer apply as you'd expect as - * the map transfomr the objects to-be-clipped separately from the objects - * that clip them and this whole relationship is broken by maps. it somehow - * managed to not break with the advent of smart objects. lucky me... but - * maps killed it. now... what do we do? that is a good question. detect - * such a broken link and "turn off clipping" in that event - sure. but this - * isn't going to be cheap as ANY addition or deletion of a map to an object - * or any change in clipper of an object or any change in smart object - * membership needs to walk the obj tree both up and down from the changed - * object and probably walk entire object trees to find these and mark them. - * thats silly-expensive and i was about to fix it that way but it has since - * dawned on me that that is just going to kill performance in some critical - * areas like during object setup and manipulation, as well as teardown. - * - * aaaaagh! best for now is to document this as a "don't do it damnit!" thing - * and have the apps avoid it. but even then - how to do this? this is not - * easy. everywhere i turn so far i come up to either expensive operations, - * breaks in logic, or nasty re-work of apps or4 the whole concept of clipping, - * smart objects and maps... and that will have to wait for evas 2.0 - * - * the below does clip fixups etc. in the even a clip spans a map boundary. - * not pretty, but necessary. - */ - -#define MAP_ACROSS 1 -static void -evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force) -{ -#ifdef MAP_ACROSS - if ((obj->cur.map_parent != map_obj) || force) - { - obj->cur.map_parent = map_obj; - obj->cur.cache.clip.dirty = 1; - evas_object_clip_recalc(obj); - if (obj->smart.smart) - { - Evas_Object *obj2; - - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) - { - // if obj has its own map - skip it. already done - if ((obj2->cur.map) && (obj2->cur.usemap)) continue; - evas_object_child_map_across_mark(obj2, map_obj, force); - } - } - else if (obj->clip.clipees) - { - Eina_List *l; - Evas_Object *obj2; - - EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) - evas_object_child_map_across_mark(obj2, map_obj, force); - } - } -#endif -} - -void -evas_object_clip_across_check(Evas_Object *obj) -{ -#ifdef MAP_ACROSS - if (!obj->cur.clipper) return; - if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent) - evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); -#endif -} - -void -evas_object_clip_across_clippees_check(Evas_Object *obj) -{ -#ifdef MAP_ACROSS - Eina_List *l; - Evas_Object *obj2; - - if (!obj->clip.clipees) return; -// schloooooooooooow: -// evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); -// buggy: - evas_object_child_map_across_mark(obj, obj->cur.map_parent, 0); - if (obj->cur.cache.clip.dirty) - { - EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) - evas_object_clip_across_clippees_check(obj2); - } -#endif -} - -// this function is called on an object when map is enabled or disabled on it -// thus creating a "map boundary" at that point. -// -// FIXME: flip2 test broken in elm - might be show/hide of clips -void -evas_object_mapped_clip_across_mark(Evas_Object *obj) -{ -#ifdef MAP_ACROSS - if ((obj->cur.map) && (obj->cur.usemap)) - evas_object_child_map_across_mark(obj, obj, 0); - else - { - if (obj->smart.parent) - evas_object_child_map_across_mark - (obj, obj->smart.parent->cur.map_parent, 0); - else - evas_object_child_map_across_mark(obj, NULL, 0); - } -#endif -} - -/* public functions */ -extern const char *o_rect_type; - -EAPI void -evas_object_clip_set(Evas_Object *obj, Evas_Object *clip) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!clip) - { - evas_object_clip_unset(obj); - return; - } - MAGIC_CHECK(clip, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - 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) - { - ERR("For now a clip on other object than a rectangle is disabled"); - return; - } - if (obj->smart.smart) - { - if (obj->smart.smart->smart_class->clip_set) - obj->smart.smart->smart_class->clip_set(obj, clip); - } - if (obj->cur.clipper) - { - /* unclip */ - obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); - if (!obj->cur.clipper->clip.clipees) - { - obj->cur.clipper->cur.have_clipees = 0; - if (obj->cur.clipper->cur.visible) - evas_damage_rectangle_add(obj->cur.clipper->layer->evas, - obj->cur.clipper->cur.geometry.x, - obj->cur.clipper->cur.geometry.y, - obj->cur.clipper->cur.geometry.w, - obj->cur.clipper->cur.geometry.h); - } - evas_object_change(obj->cur.clipper); - evas_object_change(obj); - obj->cur.clipper = NULL; - } - /* clip me */ - if ((!clip->clip.clipees) && (clip->cur.visible)) - { - /* Basically it just went invisible */ - clip->changed = 1; - clip->layer->evas->changed = 1; - evas_damage_rectangle_add(clip->layer->evas, - clip->cur.geometry.x, clip->cur.geometry.y, - clip->cur.geometry.w, clip->cur.geometry.h); - } - obj->cur.clipper = clip; - clip->clip.clipees = eina_list_append(clip->clip.clipees, obj); - if (clip->clip.clipees) clip->cur.have_clipees = 1; - - /* If it's NOT a rectangle set the mask bits too */ - /* FIXME: Optmz ths chck */ - if (strcmp(evas_object_type_get(clip),"rectangle") == 0) - obj->cur.mask = NULL; - else - { - void *engdata; - obj->cur.mask = clip; - engdata = clip->func->engine_data_get(clip); - /* FIXME: Images only */ - clip->layer->evas->engine.func->image_mask_create( - clip->layer->evas->engine.data.output, - engdata); - } - evas_object_change(clip); - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_recalc_clippees(obj); - if ((!obj->smart.smart) && - (!((obj->cur.map) && (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); - } - evas_object_clip_across_check(obj); -} - -EAPI Evas_Object * -evas_object_clip_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - return obj->cur.clipper; -} - -EAPI void -evas_object_clip_unset(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!obj->cur.clipper) return; - /* unclip */ - if (evas_object_intercept_call_clip_unset(obj)) return; - if (obj->smart.smart) - { - if (obj->smart.smart->smart_class->clip_unset) - obj->smart.smart->smart_class->clip_unset(obj); - } - if (obj->cur.clipper) - { - obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); - if (!obj->cur.clipper->clip.clipees) - { - obj->cur.clipper->cur.have_clipees = 0; - if (obj->cur.clipper->cur.visible) - evas_damage_rectangle_add(obj->cur.clipper->layer->evas, - obj->cur.clipper->cur.geometry.x, - obj->cur.clipper->cur.geometry.y, - obj->cur.clipper->cur.geometry.w, - obj->cur.clipper->cur.geometry.h); - } - evas_object_change(obj->cur.clipper); - } - obj->cur.clipper = NULL; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_recalc_clippees(obj); - if ((!obj->smart.smart) && - (!((obj->cur.map) && (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); - } - evas_object_clip_across_check(obj); -} - -EAPI const Eina_List * -evas_object_clipees_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - return obj->clip.clipees; -} diff --git a/libraries/evas/src/lib/canvas/evas_data.c b/libraries/evas/src/lib/canvas/evas_data.c deleted file mode 100644 index 3ac9d63..0000000 --- a/libraries/evas/src/lib/canvas/evas_data.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - - -EAPI void -evas_object_data_set(Evas_Object *obj, const char *key, const void *data) -{ - Evas_Data_Node *node; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!key) return; - - evas_object_data_del(obj, key); - if (!data) return; - node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1); - node->key = (char *)node + sizeof(Evas_Data_Node); - strcpy(node->key, key); - node->data = (void *)data; - obj->data.elements = eina_list_prepend(obj->data.elements, node); -} - -EAPI void * -evas_object_data_get(const Evas_Object *obj, const char *key) -{ - Eina_List *l; - Evas_Data_Node *node; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!key) return NULL; - - EINA_LIST_FOREACH(obj->data.elements, l, node) - { - if (!strcmp(node->key, key)) - { - Eina_List *lst; - lst = obj->data.elements; - lst = eina_list_promote_list(lst, l); - ((Evas_Object *)obj)->data.elements = lst; - return node->data; - } - } - return NULL; -} - -EAPI void * -evas_object_data_del(Evas_Object *obj, const char *key) -{ - Eina_List *l; - Evas_Data_Node *node; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!key) return NULL; - EINA_LIST_FOREACH(obj->data.elements, l, node) - { - if (!strcmp(node->key, key)) - { - void *data; - - data = node->data; - obj->data.elements = eina_list_remove_list(obj->data.elements, l); - free(node); - return data; - } - } - return NULL; -} diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c deleted file mode 100644 index 1ee8388..0000000 --- a/libraries/evas/src/lib/canvas/evas_events.c +++ /dev/null @@ -1,1867 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -static Eina_List * -_evas_event_object_list_in_get(Evas *e, Eina_List *in, - const Eina_Inlist *list, Evas_Object *stop, - int x, int y, int *no_rep); - -static void -_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) -{ - if (obj->smart.parent) - _evas_event_havemap_adjust(obj->smart.parent, x, y, mouse_grabbed); - - if ((!obj->cur.usemap) || (!obj->cur.map) || (!obj->cur.map->count == 4)) - return; - - evas_map_coords_get(obj->cur.map, *x, *y, x, y, mouse_grabbed); - *x += obj->cur.geometry.x; - *y += obj->cur.geometry.y; -} - -static Eina_List * -_evas_event_object_list_raw_in_get(Evas *e, Eina_List *in, - const Eina_Inlist *list, Evas_Object *stop, - int x, int y, int *no_rep) -{ - Evas_Object *obj; - int inside; - - if (!list) return in; - for (obj = _EINA_INLIST_CONTAINER(obj, list); - obj; - obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) - { - if (obj == stop) - { - *no_rep = 1; - return in; - } - if (evas_event_passes_through(obj)) continue; - if ((obj->cur.visible) && (obj->delete_me == 0) && - (!obj->clip.clipees) && - (evas_object_clippers_is_visible(obj))) - { - if (obj->smart.smart) - { - int norep = 0; - - if ((obj->cur.usemap) && (obj->cur.map) && - (obj->cur.map->count == 4)) - { - inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); - if (inside) - { - if (!evas_map_coords_get(obj->cur.map, x, y, - &(obj->cur.map->mx), - &(obj->cur.map->my), 0)) - { - inside = 0; - } - else - { - in = _evas_event_object_list_in_get - (e, in, - evas_object_smart_members_get_direct(obj), - stop, - obj->cur.geometry.x + obj->cur.map->mx, - obj->cur.geometry.y + obj->cur.map->my, - &norep); - } - } - } - else - { - in = _evas_event_object_list_in_get - (e, in, evas_object_smart_members_get_direct(obj), - stop, x, y, &norep); - } - if (norep) - { - if (!obj->repeat_events) - { - *no_rep = 1; - return in; - } - } - } - else - { - inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); - - if ((obj->cur.usemap) && (obj->cur.map) && - (obj->cur.map->count == 4)) - { - if ((inside) && - (!evas_map_coords_get(obj->cur.map, x, y, - &(obj->cur.map->mx), - &(obj->cur.map->my), 0))) - { - inside = 0; - } - } - - if (inside && ((!obj->precise_is_inside) || - (evas_object_is_inside(obj, x, y)))) - { - if (!evas_event_freezes_through(obj)) - in = eina_list_append(in, obj); - if (!obj->repeat_events) - { - *no_rep = 1; - return in; - } - } - } - } - } - *no_rep = 0; - return in; -} - -static Eina_List * -_evas_event_object_list_in_get(Evas *e, Eina_List *in, - const Eina_Inlist *list, Evas_Object *stop, - int x, int y, int *no_rep) -{ - if (!list) return NULL; - return _evas_event_object_list_raw_in_get(e, in, list->last, stop, - x, y, no_rep); -} - -Eina_List * -evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) -{ - Evas_Layer *lay; - Eina_List *in = NULL; - - if ((!e->layers) || (e->events_frozen > 0)) return NULL; - EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) - { - int norep = 0; - in = _evas_event_object_list_in_get(e, in, - EINA_INLIST_GET(lay->objects), - stop, x, y, &norep); - if (norep) return in; - } - return in; -} - -static Eina_List * -evas_event_list_copy(Eina_List *list) -{ - Eina_List *l, *new_l = NULL; - const void *data; - - EINA_LIST_FOREACH(list, l, data) - new_l = eina_list_append(new_l, data); - return new_l; -} -/* public functions */ - -EAPI void -evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->default_event_flags = flags; -} - -EAPI Evas_Event_Flags -evas_event_default_flags_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return EVAS_EVENT_FLAG_ON_HOLD; - MAGIC_CHECK_END(); - return e->default_event_flags; -} - -EAPI void -evas_event_freeze(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->events_frozen++; -} - -EAPI void -evas_event_thaw(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->events_frozen--; - if (e->events_frozen == 0) - { - Evas_Layer *lay; - - EINA_INLIST_FOREACH((EINA_INLIST_GET(e->layers)), lay) - { - Evas_Object *obj; - - EINA_INLIST_FOREACH(lay->objects, obj) - { - evas_object_clip_recalc(obj); - evas_object_recalc_clippees(obj); - } - } - } - if (e->events_frozen < 0) - evas_debug_generic(" Thaw of events when already thawed!!!\n"); -} - -EAPI int -evas_event_freeze_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return e->events_frozen; -} - -EAPI void -evas_event_thaw_eval(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (e->events_frozen != 0) return; - - evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, - e->last_timestamp, NULL); -} - -EAPI void -evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) -{ - Eina_List *l, *copy; - Evas_Event_Mouse_Down ev; - Evas_Object *obj; - int addgrab = 0; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if ((b < 1) || (b > 32)) return; - - e->pointer.button |= (1 << (b - 1)); - e->pointer.downs++; - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.button = b; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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.flags = flags; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - _evas_walk(e); - /* append new touch point to the touch point list */ - _evas_touch_point_append(e, 0, e->pointer.x, e->pointer.y); - /* If this is the first finger down, i.e no other fingers pressed, - * get a new event list, otherwise, keep the current grabbed list. */ - if (e->pointer.mouse_grabbed == 0) - { - Eina_List *ins = evas_event_objects_event_list(e, - NULL, - e->pointer.x, - e->pointer.y); - /* 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; - /* adjust grabbed count by the nuymber of currently held down - * fingers/buttons */ - if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; - } - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || - (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) - { - obj->mouse_grabbed += addgrab + 1; - e->pointer.mouse_grabbed += addgrab + 1; - if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) - { - e->pointer.nogrep++; - break; - } - } - } - EINA_LIST_FOREACH(copy, l, obj) - { - if (obj->delete_me) continue; - 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 (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id); - if (e->delete_me) break; - if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) - break; - } - if (copy) eina_list_free(copy); - e->last_mouse_down_counter++; - _evas_post_event_callback_call(e); - /* update touch point's state to EVAS_TOUCH_POINT_STILL */ - _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL); - _evas_unwalk(e); -} - -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; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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 = e->default_event_flags; - - /* 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, event_id); - } - } - 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_in; - Evas_Object *obj_itr; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev_in.buttons = e->pointer.button; - ev_in.output.x = e->pointer.x; - ev_in.output.y = e->pointer.y; - ev_in.canvas.x = e->pointer.x; - ev_in.canvas.y = e->pointer.y; - ev_in.data = (void *)data; - ev_in.modifiers = &(e->modifiers); - ev_in.locks = &(e->locks); - ev_in.timestamp = timestamp; - ev_in.event_flags = e->default_event_flags; - - EINA_LIST_FOREACH(ins, l, obj_itr) - { - ev_in.canvas.x = e->pointer.x; - ev_in.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y, obj_itr->mouse_grabbed); - if (!eina_list_data_find(e->pointer.object.in, obj_itr)) - { - if (!obj_itr->mouse_in) - { - obj_itr->mouse_in = 1; - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); - } - } - if (e->delete_me) break; - } - post_called = 1; - _evas_post_event_callback_call(e); - } - else - { - ins = eina_list_free(ins); - } - - if (e->pointer.mouse_grabbed == 0) - { - /* free our old list of ins */ - eina_list_free(e->pointer.object.in); - /* and set up the new one */ - e->pointer.object.in = ins; - } - else - { - /* free our cur ins */ - eina_list_free(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) -{ - Eina_List *l, *copy; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if ((b < 1) || (b > 32)) return; - - e->pointer.button &= ~(1 << (b - 1)); - e->pointer.downs--; - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - { - Evas_Event_Mouse_Up ev; - Evas_Object *obj; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.button = b; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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.flags = flags; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - _evas_walk(e); - /* update released touch point */ - _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP); - 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 ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && - (obj->mouse_grabbed > 0)) - { - obj->mouse_grabbed--; - e->pointer.mouse_grabbed--; - } - if (!obj->delete_me) - { - if ((e->events_frozen <= 0) && - (!evas_event_freezes_through(obj))) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); - } - if (e->delete_me) break; - if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) - { - if (e->pointer.nogrep > 0) e->pointer.nogrep--; - break; - } - } - if (copy) copy = eina_list_free(copy); - e->last_mouse_up_counter++; - _evas_post_event_callback_call(e); - } - - if (e->pointer.mouse_grabbed == 0) - { - _post_up_handle(e, timestamp, data); - } - - if (e->pointer.mouse_grabbed < 0) - { - ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", - e->pointer.mouse_grabbed); - } - /* remove released touch point from the touch point list */ - _evas_touch_point_remove(e, 0); - - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) -{ - int i; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (e->events_frozen > 0) return; - - _evas_walk(e); - for (i = 0; i < 32; i++) - { - if ((e->pointer.button & (1 << i))) - evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); - } - // FIXME: multi cancel too? - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data) -{ - Eina_List *l, *copy; - Evas_Event_Mouse_Wheel ev; - Evas_Object *obj; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.direction = direction; - ev.z = z; - 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 = e->default_event_flags; - - _evas_walk(e); - 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 ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id); - if (e->delete_me) break; - } - if (copy) copy = eina_list_free(copy); - _evas_post_event_callback_call(e); - - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) -{ - Evas_Object *nogrep_obj = NULL; - int px, py; -//// Evas_Coord pcx, pcy; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - px = e->pointer.x; - py = e->pointer.y; -//// pcx = e->pointer.canvas_x; -//// pcy = e->pointer.canvas_y; - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - e->pointer.x = x; - e->pointer.y = y; -//// e->pointer.canvas_x = x; -//// e->pointer.canvas_y = y; -//// e->pointer.canvas_x = evas_coord_screen_x_to_world(e, x); -//// e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y); - if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; - _evas_walk(e); - /* update moved touch point */ - if ((px != x) || (py != y)) - _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_MOVE); - /* if our mouse button is grabbed to any objects */ - if (e->pointer.mouse_grabbed > 0) - { - /* go thru old list of in objects */ - Eina_List *outs = NULL; - Eina_List *l, *copy; - - { - Evas_Event_Mouse_Move ev; - Evas_Object *obj; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.cur.output.x = e->pointer.x; - ev.cur.output.y = e->pointer.y; - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - ev.prev.output.x = px; - ev.prev.output.y = py; - ev.prev.canvas.x = px; - ev.prev.canvas.y = py; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, - &ev.cur.canvas.y, - obj->mouse_grabbed); - if ((e->events_frozen <= 0) && - (evas_object_clippers_is_visible(obj) || - obj->mouse_grabbed) && - (!evas_event_passes_through(obj)) && - (!evas_event_freezes_through(obj)) && - (!obj->clip.clipees)) - { - if ((px != x) || (py != y)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); - } - else - outs = eina_list_append(outs, obj); - if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && - (e->pointer.nogrep > 0)) - { - eina_list_free(copy); - nogrep_obj = obj; - goto nogrep; - } - if (e->delete_me) break; - } - _evas_post_event_callback_call(e); - } - { - Evas_Event_Mouse_Out ev; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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 = e->default_event_flags; - - if (copy) eina_list_free(copy); - while (outs) - { - Evas_Object *obj; - - obj = outs->data; - outs = eina_list_remove(outs, obj); - if ((obj->mouse_grabbed == 0) && (!e->delete_me)) - { - 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); - e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj); - if (obj->mouse_in) - { - obj->mouse_in = 0; - if (!obj->delete_me) - { - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); - } - } - } - } - _evas_post_event_callback_call(e); - } - } - else - { - Eina_List *ins; - Eina_List *l, *copy; - Evas_Event_Mouse_Move ev; - Evas_Event_Mouse_Out ev2; - Evas_Event_Mouse_In ev3; - Evas_Object *obj; - int event_id = 0, event_id2 = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.cur.output.x = e->pointer.x; - ev.cur.output.y = e->pointer.y; - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - ev.prev.output.x = px; - ev.prev.output.y = py; - ev.prev.canvas.x = px; - ev.prev.canvas.y = py; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - ev2.buttons = e->pointer.button; - ev2.output.x = e->pointer.x; - ev2.output.y = e->pointer.y; - ev2.canvas.x = e->pointer.x; - ev2.canvas.y = e->pointer.y; - ev2.data = (void *)data; - ev2.modifiers = &(e->modifiers); - ev2.locks = &(e->locks); - ev2.timestamp = timestamp; - ev2.event_flags = e->default_event_flags; - - ev3.buttons = e->pointer.button; - ev3.output.x = e->pointer.x; - ev3.output.y = e->pointer.y; - ev3.canvas.x = e->pointer.x; - ev3.canvas.y = e->pointer.y; - ev3.data = (void *)data; - ev3.modifiers = &(e->modifiers); - ev3.locks = &(e->locks); - ev3.timestamp = timestamp; - ev3.event_flags = e->default_event_flags; - - /* get all new in objects */ - ins = evas_event_objects_event_list(e, NULL, x, y); - /* go thru old list of in objects */ - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - /* if its under the pointer and its visible and its in the new */ - /* in list */ - // FIXME: i don't think we need this - // evas_object_clip_recalc(obj); - if ((e->events_frozen <= 0) && - evas_object_is_in_output_rect(obj, x, y, 1, 1) && - (evas_object_clippers_is_visible(obj) || - obj->mouse_grabbed) && - eina_list_data_find(ins, obj) && - (!evas_event_passes_through(obj)) && - (!evas_event_freezes_through(obj)) && - (!obj->clip.clipees) && - ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) - ) - { - if ((px != x) || (py != y)) - { - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); - } - } - /* otherwise it has left the object */ - else - { - if (obj->mouse_in) - { - obj->mouse_in = 0; - ev2.canvas.x = e->pointer.x; - ev2.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); - } - } - if (e->delete_me) break; - } - _evas_post_event_callback_call(e); - - _evas_object_event_new(); - - event_id2 = _evas_event_counter; - if (copy) copy = eina_list_free(copy); - /* go thru our current list of ins */ - EINA_LIST_FOREACH(ins, l, obj) - { - ev3.canvas.x = e->pointer.x; - ev3.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); - /* if its not in the old list of ins send an enter event */ - if (!eina_list_data_find(e->pointer.object.in, obj)) - { - if (!obj->mouse_in) - { - obj->mouse_in = 1; - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); - } - } - if (e->delete_me) break; - } - if (e->pointer.mouse_grabbed == 0) - { - /* free our old list of ins */ - eina_list_free(e->pointer.object.in); - /* and set up the new one */ - e->pointer.object.in = ins; - } - else - { - /* free our cur ins */ - eina_list_free(ins); - } - _evas_post_event_callback_call(e); - } - _evas_unwalk(e); - return; -nogrep: - { - Eina_List *ins = NULL; - Eina_List *newin = NULL; - Eina_List *l, *copy, *lst = NULL; - Evas_Event_Mouse_Move ev; - Evas_Event_Mouse_Out ev2; - Evas_Event_Mouse_In ev3; - Evas_Object *obj, *below_obj; - int event_id = 0, event_id2 = 0; - int norep = 0, breaknext = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.cur.output.x = e->pointer.x; - ev.cur.output.y = e->pointer.y; - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - ev.prev.output.x = px; - ev.prev.output.y = py; - ev.prev.canvas.x = px; - ev.prev.canvas.y = py; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - ev2.buttons = e->pointer.button; - ev2.output.x = e->pointer.x; - ev2.output.y = e->pointer.y; - ev2.canvas.x = e->pointer.x; - ev2.canvas.y = e->pointer.y; - ev2.data = (void *)data; - ev2.modifiers = &(e->modifiers); - ev2.locks = &(e->locks); - ev2.timestamp = timestamp; - ev2.event_flags = e->default_event_flags; - - ev3.buttons = e->pointer.button; - ev3.output.x = e->pointer.x; - ev3.output.y = e->pointer.y; - ev3.canvas.x = e->pointer.x; - ev3.canvas.y = e->pointer.y; - ev3.data = (void *)data; - ev3.modifiers = &(e->modifiers); - ev3.locks = &(e->locks); - ev3.timestamp = timestamp; - ev3.event_flags = e->default_event_flags; - - /* go thru old list of in objects */ - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - if (breaknext) - { - lst = l; - break; - } - if (obj == nogrep_obj) breaknext = 1; - } - - /* get all new in objects */ - below_obj = evas_object_below_get(nogrep_obj); - if (below_obj) - ins = _evas_event_object_list_raw_in_get(e, NULL, - EINA_INLIST_GET(below_obj), NULL, - e->pointer.x, e->pointer.y, - &norep); - EINA_LIST_FOREACH(copy, l, obj) - { - newin = eina_list_append(newin, obj); - if (obj == nogrep_obj) break; - } - EINA_LIST_FOREACH(ins, l, obj) - { - newin = eina_list_append(newin, obj); - } - - EINA_LIST_FOREACH(lst, l, obj) - { - /* if its under the pointer and its visible and its in the new */ - /* in list */ - // FIXME: i don't think we need this - // evas_object_clip_recalc(obj); - if ((e->events_frozen <= 0) && - evas_object_is_in_output_rect(obj, x, y, 1, 1) && - (evas_object_clippers_is_visible(obj) || - obj->mouse_grabbed) && - eina_list_data_find(newin, obj) && - (!evas_event_passes_through(obj)) && - (!evas_event_freezes_through(obj)) && - (!obj->clip.clipees) && - ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) - ) - { - if ((px != x) || (py != y)) - { - ev.cur.canvas.x = e->pointer.x; - ev.cur.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); - } - } - /* otherwise it has left the object */ - else - { - if (obj->mouse_in) - { - obj->mouse_in = 0; - ev2.canvas.x = e->pointer.x; - ev2.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); - } - } - if (e->delete_me) break; - } - _evas_post_event_callback_call(e); - - _evas_object_event_new(); - - event_id2 = _evas_event_counter; - if (copy) copy = eina_list_free(copy); - /* go thru our current list of ins */ - EINA_LIST_FOREACH(newin, l, obj) - { - ev3.canvas.x = e->pointer.x; - ev3.canvas.y = e->pointer.y; - _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); - /* if its not in the old list of ins send an enter event */ - if (!eina_list_data_find(e->pointer.object.in, obj)) - { - if (!obj->mouse_in) - { - obj->mouse_in = 1; - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); - } - } - if (e->delete_me) break; - } - /* free our old list of ins */ - eina_list_free(e->pointer.object.in); - /* and set up the new one */ - e->pointer.object.in = newin; - - _evas_post_event_callback_call(e); - } - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) -{ - Eina_List *ins; - Eina_List *l; - Evas_Event_Mouse_In ev; - Evas_Object *obj; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->pointer.inside = 1; - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - if (e->pointer.mouse_grabbed != 0) return; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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 = e->default_event_flags; - - _evas_walk(e); - /* get new list of ins */ - ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); - 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, event_id); - } - } - if (e->delete_me) break; - } - /* 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; - _evas_post_event_callback_call(e); - evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data); - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) -{ - Evas_Event_Mouse_Out ev; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->pointer.inside = 0; - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.buttons = e->pointer.button; - ev.output.x = e->pointer.x; - ev.output.y = e->pointer.y; - 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 = e->default_event_flags; - - _evas_walk(e); - /* if our mouse button is inside any objects */ - { - /* go thru old list of in objects */ - Eina_List *l, *copy; - Evas_Object *obj; - - 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 (obj->mouse_in) - { - obj->mouse_in = 0; - if (!obj->delete_me) - { - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); - } - obj->mouse_grabbed = 0; - } - if (e->delete_me) break; - } - if (copy) copy = eina_list_free(copy); - /* free our old list of ins */ - e->pointer.object.in = eina_list_free(e->pointer.object.in); - e->pointer.mouse_grabbed = 0; - _evas_post_event_callback_call(e); - } - _evas_unwalk(e); -} - -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) -{ - Eina_List *l, *copy; - Evas_Event_Multi_Down ev; - Evas_Object *obj; - int addgrab = 0; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - e->pointer.downs++; - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.device = d; - ev.output.x = x; - ev.output.y = y; - ev.canvas.x = x; - ev.canvas.y = y; - ev.radius = rad; - ev.radius_x = radx; - ev.radius_y = rady; - ev.pressure = pres; - ev.angle = ang; - ev.canvas.xsub = fx; - ev.canvas.ysub = fy; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.flags = flags; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - _evas_walk(e); - /* append new touch point to the touch point list */ - _evas_touch_point_append(e, d, x, y); - if (e->pointer.mouse_grabbed == 0) - { - if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; - } - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) - { - obj->mouse_grabbed += addgrab + 1; - e->pointer.mouse_grabbed += addgrab + 1; - } - } - EINA_LIST_FOREACH(copy, l, obj) - { - ev.canvas.x = x; - ev.canvas.y = y; - ev.canvas.xsub = fx; - ev.canvas.ysub = fy; - _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); - if (x != ev.canvas.x) - ev.canvas.xsub = ev.canvas.x; // fixme - lost precision - if (y != ev.canvas.y) - ev.canvas.ysub = ev.canvas.y; // fixme - lost precision - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id); - if (e->delete_me) break; - } - if (copy) eina_list_free(copy); - _evas_post_event_callback_call(e); - /* update touch point's state to EVAS_TOUCH_POINT_STILL */ - _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_STILL); - _evas_unwalk(e); -} - -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) -{ - Eina_List *l, *copy; - Evas_Event_Multi_Up ev; - Evas_Object *obj; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - e->pointer.downs--; - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.device = d; - ev.output.x = x; - ev.output.y = y; - ev.canvas.x = x; - ev.canvas.y = y; - ev.radius = rad; - ev.radius_x = radx; - ev.radius_y = rady; - ev.pressure = pres; - ev.angle = ang; - ev.canvas.xsub = fx; - ev.canvas.ysub = fy; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.flags = flags; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - _evas_walk(e); - /* update released touch point */ - _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_UP); - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - ev.canvas.x = x; - ev.canvas.y = y; - ev.canvas.xsub = fx; - ev.canvas.ysub = fy; - _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); - if (x != ev.canvas.x) - 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 > 0)) - { - obj->mouse_grabbed--; - e->pointer.mouse_grabbed--; - } - if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id); - if (e->delete_me) break; - } - if (copy) copy = eina_list_free(copy); - if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, timestamp, data)) - _evas_post_event_callback_call(e); - /* remove released touch point from the touch point list */ - _evas_touch_point_remove(e, d); - _evas_unwalk(e); -} - -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) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; - - _evas_walk(e); - /* update moved touch point */ - _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_MOVE); - /* if our mouse button is grabbed to any objects */ - if (e->pointer.mouse_grabbed > 0) - { - /* go thru old list of in objects */ - Eina_List *l, *copy; - Evas_Event_Multi_Move ev; - Evas_Object *obj; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.device = d; - ev.cur.output.x = x; - ev.cur.output.y = y; - ev.cur.canvas.x = x; - ev.cur.canvas.y = y; - ev.radius = rad; - ev.radius_x = radx; - ev.radius_y = rady; - ev.pressure = pres; - ev.angle = ang; - ev.cur.canvas.xsub = fx; - ev.cur.canvas.ysub = fy; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - if ((e->events_frozen <= 0) && - (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && - (!evas_event_passes_through(obj)) && - (!evas_event_freezes_through(obj)) && - (!obj->clip.clipees)) - { - ev.cur.canvas.x = x; - ev.cur.canvas.y = y; - ev.cur.canvas.xsub = fx; - ev.cur.canvas.ysub = fy; - _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - if (x != ev.cur.canvas.x) - ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision - if (y != ev.cur.canvas.y) - ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); - } - if (e->delete_me) break; - } - _evas_post_event_callback_call(e); - } - else - { - Eina_List *ins; - Eina_List *l, *copy; - Evas_Event_Multi_Move ev; - Evas_Object *obj; - int event_id = 0; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.device = d; - ev.cur.output.x = x; - ev.cur.output.y = y; - ev.cur.canvas.x = x; - ev.cur.canvas.y = y; - ev.radius = rad; - ev.radius_x = radx; - ev.radius_y = rady; - ev.pressure = pres; - ev.angle = ang; - ev.cur.canvas.xsub = fx; - ev.cur.canvas.ysub = fy; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - /* get all new in objects */ - ins = evas_event_objects_event_list(e, NULL, x, y); - /* go thru old list of in objects */ - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - /* if its under the pointer and its visible and its in the new */ - /* in list */ - // FIXME: i don't think we need this - // evas_object_clip_recalc(obj); - if ((e->events_frozen <= 0) && - evas_object_is_in_output_rect(obj, x, y, 1, 1) && - (evas_object_clippers_is_visible(obj) || - obj->mouse_grabbed) && - eina_list_data_find(ins, obj) && - (!evas_event_passes_through(obj)) && - (!evas_event_freezes_through(obj)) && - (!obj->clip.clipees) && - ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) - ) - { - ev.cur.canvas.x = x; - ev.cur.canvas.y = y; - ev.cur.canvas.xsub = fx; - ev.cur.canvas.ysub = fy; - _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - if (x != ev.cur.canvas.x) - ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision - if (y != ev.cur.canvas.y) - ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); - } - if (e->delete_me) break; - } - if (copy) copy = eina_list_free(copy); - if (e->pointer.mouse_grabbed == 0) - { - /* free our old list of ins */ - eina_list_free(e->pointer.object.in); - /* and set up the new one */ - e->pointer.object.in = ins; - } - else - { - /* free our cur ins */ - eina_list_free(ins); - } - _evas_post_event_callback_call(e); - } - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) -{ - int event_id = 0; - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (!keyname) return; - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - _evas_walk(e); - - Evas_Event_Key_Down ev; - Eina_Bool exclusive; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - exclusive = EINA_FALSE; - ev.keyname = (char *)keyname; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.key = key; - ev.string = string; - ev.compose = compose; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - if (e->grabs) - { - Eina_List *l; - Evas_Key_Grab *g; - - e->walking_grabs++; - EINA_LIST_FOREACH(e->grabs, l, g) - { - if (g->just_added) - { - g->just_added = EINA_FALSE; - continue; - } - if (g->delete_me) continue; - if (((e->modifiers.mask & g->modifiers) || - (g->modifiers == e->modifiers.mask)) && - (!strcmp(keyname, g->keyname))) - { - if (!(e->modifiers.mask & g->not_modifiers)) - { - if (e->events_frozen <= 0 && - !evas_event_freezes_through(g->object)) - evas_object_event_callback_call(g->object, - EVAS_CALLBACK_KEY_DOWN, - &ev, event_id); - if (g->exclusive) exclusive = EINA_TRUE; - } - } - if (e->delete_me) break; - } - e->walking_grabs--; - if (e->walking_grabs <= 0) - { - while (e->delete_grabs > 0) - { - e->delete_grabs--; - for (l = e->grabs; l;) - { - g = eina_list_data_get(l); - l = eina_list_next(l); - if (g->delete_me) - evas_key_grab_free(g->object, g->keyname, g->modifiers, - g->not_modifiers); - } - } - } - } - if ((e->focused) && (!exclusive)) - { - if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) - evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, - &ev, event_id); - } - _evas_post_event_callback_call(e); - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) -{ - int event_id = 0; - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - _evas_walk(e); - - Evas_Event_Key_Up ev; - Eina_Bool exclusive; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - exclusive = EINA_FALSE; - ev.keyname = (char *)keyname; - ev.data = (void *)data; - ev.modifiers = &(e->modifiers); - ev.locks = &(e->locks); - ev.key = key; - ev.string = string; - ev.compose = compose; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - if (e->grabs) - { - Eina_List *l; - Evas_Key_Grab *g; - - e->walking_grabs++; - EINA_LIST_FOREACH(e->grabs, l, g) - { - if (g->just_added) - { - g->just_added = EINA_FALSE; - continue; - } - if (g->delete_me) continue; - if (((e->modifiers.mask & g->modifiers) || - (g->modifiers == e->modifiers.mask)) && - (!((e->modifiers.mask & g->not_modifiers) || - (g->not_modifiers == ~e->modifiers.mask))) && - (!strcmp(keyname, g->keyname))) - { - if (e->events_frozen <= 0 && - !evas_event_freezes_through(g->object)) - evas_object_event_callback_call(g->object, - EVAS_CALLBACK_KEY_UP, &ev, event_id); - if (g->exclusive) exclusive = EINA_TRUE; - } - if (e->delete_me) break; - } - e->walking_grabs--; - if (e->walking_grabs <= 0) - { - while (e->delete_grabs > 0) - { - Eina_List *ll, *l_next; - Evas_Key_Grab *gr; - - e->delete_grabs--; - EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr) - { - if (gr->delete_me) - evas_key_grab_free(gr->object, gr->keyname, - gr->modifiers, gr->not_modifiers); - } - } - } - } - if ((e->focused) && (!exclusive)) - { - if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) - evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, - &ev, event_id); - } - _evas_post_event_callback_call(e); - _evas_unwalk(e); -} - -EAPI void -evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data) -{ - Eina_List *l, *copy; - Evas_Event_Hold ev; - Evas_Object *obj; - int event_id = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (e->events_frozen > 0) return; - e->last_timestamp = timestamp; - - _evas_object_event_new(); - - event_id = _evas_event_counter; - ev.hold = hold; - ev.data = (void *)data; - ev.timestamp = timestamp; - ev.event_flags = e->default_event_flags; - - _evas_walk(e); - copy = evas_event_list_copy(e->pointer.object.in); - EINA_LIST_FOREACH(copy, l, obj) - { - if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id); - if (e->delete_me) break; - } - if (copy) copy = eina_list_free(copy); - _evas_post_event_callback_call(e); - _evas_unwalk(e); - _evas_object_event_new(); -} - -EAPI void -evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - freeze = !!freeze; - if (obj->freeze_events == freeze) return; - obj->freeze_events = freeze; - evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE); -} - -EAPI Eina_Bool -evas_object_freeze_events_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return obj->freeze_events; -} - -EAPI void -evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - pass = !!pass; - if (obj->pass_events == pass) return; - obj->pass_events = pass; - evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_FALSE); - if (evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1) && - ((!obj->precise_is_inside) || - (evas_object_is_inside(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y)))) - evas_event_feed_mouse_move(obj->layer->evas, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, - obj->layer->evas->last_timestamp, - NULL); -} - -EAPI Eina_Bool -evas_object_pass_events_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return obj->pass_events; -} - -EAPI void -evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - repeat = !!repeat; - if (obj->repeat_events == repeat) return; - obj->repeat_events = repeat; - if (evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1) && - ((!obj->precise_is_inside) || - (evas_object_is_inside(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y)))) - evas_event_feed_mouse_move(obj->layer->evas, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, - obj->layer->evas->last_timestamp, - NULL); -} - -EAPI Eina_Bool -evas_object_repeat_events_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return obj->repeat_events; -} - -EAPI void -evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->no_propagate = !prop; -} - -EAPI Eina_Bool -evas_object_propagate_events_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return !(obj->no_propagate); -} - -EAPI void -evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->pointer_mode = setting; -} - -EAPI Evas_Object_Pointer_Mode -evas_object_pointer_mode_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_OBJECT_POINTER_MODE_AUTOGRAB; - MAGIC_CHECK_END(); - return obj->pointer_mode; -} - -EAPI void -evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) -{ - switch (event_type) - { - case EVAS_CALLBACK_MOUSE_IN: - { - Evas_Event_Mouse_In *ev = event_copy; - evas_event_feed_mouse_in(e, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MOUSE_OUT: - { - Evas_Event_Mouse_Out *ev = event_copy; - evas_event_feed_mouse_out(e, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_copy; - evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_copy; - evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MOUSE_MOVE: - { - Evas_Event_Mouse_Move *ev = event_copy; - evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MOUSE_WHEEL: - { - Evas_Event_Mouse_Wheel *ev = event_copy; - evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MULTI_DOWN: - { - Evas_Event_Multi_Down *ev = event_copy; - evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MULTI_UP: - { - Evas_Event_Multi_Up *ev = event_copy; - evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_MULTI_MOVE: - { - Evas_Event_Multi_Move *ev = event_copy; - evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_KEY_DOWN: - { - Evas_Event_Key_Down *ev = event_copy; - evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } - case EVAS_CALLBACK_KEY_UP: - { - Evas_Event_Key_Up *ev = event_copy; - evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } - default: /* All non-input events are not handeled */ - break; - } -} - -EAPI int -evas_event_down_count_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return e->pointer.downs; -} diff --git a/libraries/evas/src/lib/canvas/evas_filter.c b/libraries/evas/src/lib/canvas/evas_filter.c deleted file mode 100644 index 6194ec2..0000000 --- a/libraries/evas/src/lib/canvas/evas_filter.c +++ /dev/null @@ -1,1427 +0,0 @@ -/* - * 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 // offsetof - -#include "evas_common.h" -#include "evas_private.h" - -#include -/* 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 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c deleted file mode 100644 index 29da7e7..0000000 --- a/libraries/evas/src/lib/canvas/evas_focus.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* private calls */ - -/* local calls */ - -/* public calls */ - -EAPI void -evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) -{ - int event_id = 0; - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - _evas_object_event_new(); - - event_id = _evas_event_counter; - if (focus) - { - if (obj->focused) goto end; - if (obj->layer->evas->focused) - evas_object_focus_set(obj->layer->evas->focused, 0); - obj->focused = 1; - obj->layer->evas->focused = obj; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); - evas_event_callback_call(obj->layer->evas, - EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); - } - else - { - if (!obj->focused) goto end; - obj->focused = 0; - obj->layer->evas->focused = NULL; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); - evas_event_callback_call(obj->layer->evas, - EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); - } - end: - _evas_post_event_callback_call(obj->layer->evas); -} - -EAPI Eina_Bool -evas_object_focus_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - return obj->focused; -} - -EAPI Evas_Object * -evas_focus_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - return e->focused; -} diff --git a/libraries/evas/src/lib/canvas/evas_font_dir.c b/libraries/evas/src/lib/canvas/evas_font_dir.c deleted file mode 100644 index e97f7f7..0000000 --- a/libraries/evas/src/lib/canvas/evas_font_dir.c +++ /dev/null @@ -1,1349 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_EVIL -# include -#endif - -#ifdef BUILD_FONT_LOADER_EET -#include -#endif - -#ifdef HAVE_FONTCONFIG -#include -#endif - -#include "evas_common.h" -#include "evas_private.h" - -/* font dir cache */ -static Eina_Hash *font_dirs = NULL; -static Eina_List *fonts_cache = NULL; -static Eina_List *fonts_zero = NULL; - -typedef struct _Fndat Fndat; - -struct _Fndat -{ - Evas_Font_Description *fdesc; - const char *source; - Evas_Font_Size size; - Evas_Font_Set *font; - int ref; - Font_Rend_Flags wanted_rend; - -#ifdef HAVE_FONTCONFIG - FcFontSet *set; - FcPattern *p_nm; -#endif -}; - -/* private methods for font dir cache */ -static Eina_Bool font_cache_dir_free(const Eina_Hash *hash, const void *key, void *data, void *fdata); -static Evas_Font_Dir *object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd); -static Evas_Font *object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font); -static Evas_Font *object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font); -static Evas_Font *object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font); -static Evas_Font *object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font); -static Evas_Font_Dir *object_text_font_cache_dir_add(char *dir); -static void object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd); -static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]); - -#ifdef HAVE_FONTCONFIG -static int fc_init = 0; -#endif - -void -evas_font_dir_cache_free(void) -{ - if (!font_dirs) return; - - eina_hash_foreach(font_dirs, font_cache_dir_free, NULL); - eina_hash_free(font_dirs); - font_dirs = NULL; - -#ifdef HAVE_FONTCONFIG -/* this is bad i got a: - * fccache.c:512: FcCacheFini: Assertion fcCacheChains[i] == ((void *)0)' failed. - * - * all i can do for now is shut this puppy down. butthat breaks, so disable - * it as in reality - there is little reason to care about the memory not - * being freed etc. - * - * fc_init--; - * if (fc_init == 0) FcFini(); - */ -#endif -} - -const char * -evas_font_dir_cache_find(char *dir, char *font) -{ - Evas_Font_Dir *fd = NULL; - - if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); - else fd = eina_hash_find(font_dirs, dir); - fd = object_text_font_cache_dir_update(dir, fd); - if (fd) - { - Evas_Font *fn; - - fn = object_text_font_cache_font_find(fd, font); - if (fn) - { - return fn->path; - } - } - return NULL; -} - -static Eina_List * -evas_font_set_get(const char *name) -{ - Eina_List *fonts = NULL; - char *p; - - p = strchr(name, ','); - if (!p) - { - fonts = eina_list_append(fonts, eina_stringshare_add(name)); - } - else - { - const char *pp; - char *nm; - - pp = name; - while (p) - { - nm = alloca(p - pp + 1); - strncpy(nm, pp, p - pp); - nm[p - pp] = 0; - fonts = eina_list_append(fonts, eina_stringshare_add(nm)); - pp = p + 1; - p = strchr(pp, ','); - if (!p) fonts = eina_list_append(fonts, eina_stringshare_add(pp)); - } - } - return fonts; -} - -void -evas_fonts_zero_free(Evas *evas) -{ - Fndat *fd; - - EINA_LIST_FREE(fonts_zero, fd) - { - if (fd->fdesc) evas_font_desc_unref(fd->fdesc); - if (fd->source) eina_stringshare_del(fd->source); - evas->engine.func->font_free(evas->engine.data.output, fd->font); -#ifdef HAVE_FONTCONFIG - if (fd->set) FcFontSetDestroy(fd->set); - if (fd->p_nm) FcPatternDestroy(fd->p_nm); -#endif - free(fd); - } -} - -void -evas_fonts_zero_presure(Evas *evas) -{ - Fndat *fd; - - while (fonts_zero - && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */ - { - fd = eina_list_data_get(fonts_zero); - - if (fd->ref != 0) break; - fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); - - if (fd->fdesc) evas_font_desc_unref(fd->fdesc); - if (fd->source) eina_stringshare_del(fd->source); - evas->engine.func->font_free(evas->engine.data.output, fd->font); -#ifdef HAVE_FONTCONFIG - if (fd->set) FcFontSetDestroy(fd->set); - if (fd->p_nm) FcPatternDestroy(fd->p_nm); -#endif - free(fd); - - if (eina_list_count(fonts_zero) < 5) break; - } -} - -void -evas_font_free(Evas *evas, void *font) -{ - Eina_List *l; - Fndat *fd; - - EINA_LIST_FOREACH(fonts_cache, l, fd) - { - if (fd->font == font) - { - fd->ref--; - if (fd->ref == 0) - { - fonts_cache = eina_list_remove_list(fonts_cache, l); - fonts_zero = eina_list_append(fonts_zero, fd); - } - break; - } - } - while (fonts_zero - && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */ - { - fd = eina_list_data_get(fonts_zero); - - if (fd->ref != 0) break; - fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); - - if (fd->fdesc) evas_font_desc_unref(fd->fdesc); - if (fd->source) eina_stringshare_del(fd->source); - evas->engine.func->font_free(evas->engine.data.output, fd->font); -#ifdef HAVE_FONTCONFIG - if (fd->set) FcFontSetDestroy(fd->set); - if (fd->p_nm) FcPatternDestroy(fd->p_nm); -#endif - free(fd); - - if (eina_list_count(fonts_zero) < 43) break; - } -} - -static void -evas_font_init(void) -{ - static int done = 0; - if (done) return; - done = 1; -#ifdef HAVE_FONTCONFIG - fc_init++; - if (fc_init == 1) - { - FcInit(); - FcConfigEnableHome(1); - } -#endif -} - -#ifdef HAVE_FONTCONFIG -static Evas_Font_Set * -evas_load_fontconfig(Evas *evas, FcFontSet *set, int size, - Font_Rend_Flags wanted_rend) -{ - Evas_Font_Set *font = NULL; - int i; - - /* Do loading for all in family */ - for (i = 0; i < set->nfont; i++) - { - FcValue filename; - - 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, wanted_rend); - else - font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend); - } - - return font; -} -#endif - -#ifdef HAVE_FONTCONFIG -/* In sync with Evas_Font_Style, Evas_Font_Weight and Evas_Font_Width */ -static int _fc_slant_map[] = -{ - FC_SLANT_ROMAN, - FC_SLANT_OBLIQUE, - FC_SLANT_ITALIC -}; - -static int _fc_weight_map[] = -{ - FC_WEIGHT_NORMAL, - FC_WEIGHT_THIN, - FC_WEIGHT_ULTRALIGHT, - FC_WEIGHT_LIGHT, - FC_WEIGHT_BOOK, - FC_WEIGHT_MEDIUM, - FC_WEIGHT_SEMIBOLD, - FC_WEIGHT_BOLD, - FC_WEIGHT_ULTRABOLD, - FC_WEIGHT_BLACK, - FC_WEIGHT_EXTRABLACK -}; - -# ifdef FC_WIDTH -static int _fc_width_map[] = -{ - FC_WIDTH_NORMAL, - FC_WIDTH_ULTRACONDENSED, - FC_WIDTH_EXTRACONDENSED, - FC_WIDTH_CONDENSED, - FC_WIDTH_SEMICONDENSED, - FC_WIDTH_SEMIEXPANDED, - FC_WIDTH_EXPANDED, - FC_WIDTH_EXTRAEXPANDED, - FC_WIDTH_ULTRAEXPANDED -}; -# endif - -#endif - -struct _Style_Map -{ - const char *name; - int type; -}; -typedef struct _Style_Map Style_Map; - -static Style_Map _style_width_map[] = -{ - {"normal", EVAS_FONT_WIDTH_NORMAL}, - {"ultracondensed", EVAS_FONT_WIDTH_ULTRACONDENSED}, - {"extracondensed", EVAS_FONT_WIDTH_EXTRACONDENSED}, - {"condensed", EVAS_FONT_WIDTH_CONDENSED}, - {"semicondensed", EVAS_FONT_WIDTH_SEMICONDENSED}, - {"semiexpanded", EVAS_FONT_WIDTH_SEMIEXPANDED}, - {"expanded", EVAS_FONT_WIDTH_EXPANDED}, - {"extraexpanded", EVAS_FONT_WIDTH_EXTRAEXPANDED}, - {"ultraexpanded", EVAS_FONT_WIDTH_ULTRAEXPANDED}, -}; - -static Style_Map _style_weight_map[] = -{ - {"normal", EVAS_FONT_WEIGHT_NORMAL}, - {"thin", EVAS_FONT_WEIGHT_THIN}, - {"ultralight", EVAS_FONT_WEIGHT_ULTRALIGHT}, - {"light", EVAS_FONT_WEIGHT_LIGHT}, - {"book", EVAS_FONT_WEIGHT_BOOK}, - {"medium", EVAS_FONT_WEIGHT_MEDIUM}, - {"semibold", EVAS_FONT_WEIGHT_SEMIBOLD}, - {"bold", EVAS_FONT_WEIGHT_BOLD}, - {"ultrabold", EVAS_FONT_WEIGHT_ULTRABOLD}, - {"black", EVAS_FONT_WEIGHT_BLACK}, - {"extrablack", EVAS_FONT_WEIGHT_EXTRABLACK} -}; - -static Style_Map _style_slant_map[] = -{ - {"normal", EVAS_FONT_SLANT_NORMAL}, - {"oblique", EVAS_FONT_SLANT_OBLIQUE}, - {"italic", EVAS_FONT_SLANT_ITALIC} -}; - -#define _STYLE_MAP_LEN(x) (sizeof(x) / sizeof(*(x))) -/** - * @internal - * Find a certain attribute from the map in the style. - * @return the index of the found one. - */ -static int -_evas_font_style_find_internal(const char *style, const char *style_end, - Style_Map _map[], size_t map_len) -{ - size_t i; - while (style < style_end) - { - for (i = 0 ; i < map_len ; i++) - { - size_t len; - const char *cur = _map[i].name; - len = strlen(cur); - if (!strncasecmp(style, cur, len) && - (!cur[len] || (cur[len] == ' '))) - { - return _map[i].type; - } - } - style = strchr(style, ' '); - if (!style) - break; - - while (*style && (*style == ' ')) - style++; - } - return 0; -} - -int -evas_font_style_find(const char *start, const char *end, - Evas_Font_Style style) -{ -#define _RET_STYLE(x) \ - return _evas_font_style_find_internal(start, end, \ - _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); - switch (style) - { - case EVAS_FONT_STYLE_SLANT: - _RET_STYLE(slant); - case EVAS_FONT_STYLE_WEIGHT: - _RET_STYLE(weight); - case EVAS_FONT_STYLE_WIDTH: - _RET_STYLE(width); - default: - return 0; - } -#undef _RET_STYLE -} - -void -evas_font_desc_unref(Evas_Font_Description *fdesc) -{ - if (--(fdesc->ref) == 0) - { - eina_stringshare_del(fdesc->name); - eina_stringshare_del(fdesc->fallbacks); - eina_stringshare_del(fdesc->lang); - free(fdesc); - } -} - -Evas_Font_Description * -evas_font_desc_ref(Evas_Font_Description *fdesc) -{ - fdesc->ref++; - return fdesc; -} - -Evas_Font_Description * -evas_font_desc_new(void) -{ - Evas_Font_Description *fdesc; - fdesc = calloc(1, sizeof(*fdesc)); - fdesc->ref = 1; - fdesc->is_new = EINA_TRUE; - - return fdesc; -} - -Evas_Font_Description * -evas_font_desc_dup(const Evas_Font_Description *fdesc) -{ - Evas_Font_Description *new; - new = evas_font_desc_new(); - memcpy(new, fdesc, sizeof(*new)); - new->ref = 1; - new->is_new = EINA_TRUE; - new->name = eina_stringshare_ref(new->name); - - return new; -} - -int -evas_font_desc_cmp(const Evas_Font_Description *a, - const Evas_Font_Description *b) -{ - /* FIXME: Do actual comparison, i.e less than and bigger than. */ - return !((a->name == b->name) && (a->weight == b->weight) && - (a->slant == b->slant) && (a->width == b->width) && - (a->lang == b->lang)); -} - -void -evas_font_name_parse(Evas_Font_Description *fdesc, const char *name) -{ - const char *end; - - end = strchr(name, ':'); - if (!end) - eina_stringshare_replace(&(fdesc->name), name); - else - eina_stringshare_replace_length(&(fdesc->name), name, end - name); - - while (end) - { - const char *tend; - name = end; - end = strchr(end + 1, ':'); - if (!end) - tend = name + strlen(name); - else - tend = end; - - if (!strncmp(name, ":style=", 7)) - { -#define _SET_STYLE(x) \ - fdesc->x = _evas_font_style_find_internal(name + 7, tend, \ - _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); - _SET_STYLE(slant); - _SET_STYLE(weight); - _SET_STYLE(width); -#undef _SET_STYLE - } - else if (!strncmp(name, ":lang=", 6)) - { - const char *tmp = name + 6; - eina_stringshare_replace_length(&(fdesc->lang), tmp, tend - tmp); - } - } -} - -void * -evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size) -{ -#ifdef HAVE_FONTCONFIG - FcPattern *p_nm = NULL; - FcFontSet *set = NULL; -#endif - - Evas_Font_Set *font = NULL; - Eina_List *fonts, *l; - Fndat *fd; - char *nm; - Font_Rend_Flags wanted_rend = 0; - - if (!fdesc) return NULL; - fdesc->is_new = EINA_FALSE; - - if (fdesc->slant != EVAS_FONT_SLANT_NORMAL) - wanted_rend |= FONT_REND_SLANT; - if (fdesc->weight == EVAS_FONT_WEIGHT_BOLD) - wanted_rend |= FONT_REND_WEIGHT; - - evas_font_init(); - - EINA_LIST_FOREACH(fonts_cache, l, fd) - { - if (!evas_font_desc_cmp(fdesc, fd->fdesc)) - { - if (((!source) && (!fd->source)) || - ((source) && (fd->source) && (!strcmp(source, fd->source)))) - { - if ((size == fd->size) && - (wanted_rend == fd->wanted_rend)) - { - fonts_cache = eina_list_promote_list(fonts_cache, l); - fd->ref++; - return fd->font; - } -#ifdef HAVE_FONTCONFIG - else if (fd->set && fd->p_nm) - { - font = evas_load_fontconfig(evas, fd->set, size, - wanted_rend); - goto on_find; - } -#endif - } - } - } - - EINA_LIST_FOREACH(fonts_zero, l, fd) - { - if (!evas_font_desc_cmp(fdesc, fd->fdesc)) - { - if (((!source) && (!fd->source)) || - ((source) && (fd->source) && (!strcmp(source, fd->source)))) - { - 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); - fd->ref++; - return fd->font; - } -#ifdef HAVE_FONTCONFIG - else if (fd->set && fd->p_nm) - { - font = evas_load_fontconfig(evas, fd->set, size, - wanted_rend); - goto on_find; - } -#endif - } - } - } - - fonts = evas_font_set_get(fdesc->name); - EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */ - { - if (l == fonts || !font) /* First iteration OR no font */ - { -#ifdef BUILD_FONT_LOADER_EET - if (source) /* Load Font from "eet" source */ - { - Eet_File *ef; - char *fake_name; - - fake_name = evas_file_path_join(source, nm); - if (fake_name) - { - 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!!! */ - ef = eet_open(source, EET_FILE_MODE_READ); - if (ef) - { - void *fdata; - int fsize = 0; - - 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, wanted_rend); - free(fdata); - } - eet_close(ef); - } - } - free(fake_name); - } - } - if (!font) /* Source load failed */ - { -#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, wanted_rend); - else /* search font path */ - { - Eina_List *ll; - char *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, wanted_rend); - if (font) break; - } - } - } -#ifdef BUILD_FONT_LOADER_EET - } -#endif - } - else /* Base font loaded, append others */ - { -#ifdef BUILD_FONT_LOADER_EET - void *ok = NULL; - - if (source) - { - Eet_File *ef; - char *fake_name; - - fake_name = evas_file_path_join(source, nm); - if (fake_name) - { - /* FIXME: make an engine func */ - 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); - if (ef) - { - void *fdata; - int fsize = 0; - - 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, wanted_rend); - free(fdata); - } - eet_close(ef); - } - } - else - ok = (void *)1; - free(fake_name); - } - } - if (!ok) - { -#endif - if (evas_file_path_is_full_path((char *)nm)) - evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend); - else - { - Eina_List *ll; - char *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, wanted_rend)) - break; - } - } - } -#ifdef BUILD_FONT_LOADER_EET - } -#endif - } - eina_stringshare_del(nm); - } - fonts = eina_list_free(fonts); - -#ifdef HAVE_FONTCONFIG - if (!font) /* Search using fontconfig */ - { - FcResult res; - - p_nm = FcPatternBuild (NULL, - FC_WEIGHT, FcTypeInteger, _fc_weight_map[fdesc->weight], - FC_SLANT, FcTypeInteger, _fc_slant_map[fdesc->slant], -#ifdef FC_WIDTH - FC_WIDTH, FcTypeInteger, _fc_width_map[fdesc->width], -#endif - NULL); - FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) fdesc->name); - - /* Handle font fallbacks */ - if (fdesc->fallbacks) - { - while (1) - { - const char *start, *end; - start = fdesc->fallbacks; - end = strchr(start, ','); - if (end) - { - char *tmp = alloca((end - start) + 1); - strncpy(tmp, start, end - start); - tmp[end - start] = 0; - FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) tmp); - } - else - { - FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start); - break; - } - } - } - - if (fdesc->lang) - FcPatternAddString (p_nm, FC_LANG, (FcChar8 *) fdesc->lang); - - FcConfigSubstitute(NULL, p_nm, FcMatchPattern); - FcDefaultSubstitute(p_nm); - - /* do matching */ - set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res); - if (!set) - { - ERR("No fontconfig font matches '%s'. It was the last resource, no font found!", fdesc->name); - FcPatternDestroy(p_nm); - p_nm = NULL; - } - else - { - font = evas_load_fontconfig(evas, set, size, wanted_rend); - } - } -#endif - -#ifdef HAVE_FONTCONFIG - on_find: -#endif - fd = calloc(1, sizeof(Fndat)); - if (fd) - { - fd->fdesc = evas_font_desc_ref(fdesc); - if (source) fd->source = eina_stringshare_add(source); - fd->font = font; - fd->wanted_rend = wanted_rend; - fd->size = size; - fd->ref = 1; - fonts_cache = eina_list_prepend(fonts_cache, fd); -#ifdef HAVE_FONTCONFIG - fd->set = set; - fd->p_nm = p_nm; -#endif - } - - if (font) - evas->engine.func->font_hinting_set(evas->engine.data.output, font, - evas->hinting); - return font; -} - -void -evas_font_load_hinting_set(Evas *evas, void *font, int hinting) -{ - evas->engine.func->font_hinting_set(evas->engine.data.output, font, - hinting); -} - -Eina_List * -evas_font_dir_available_list(const Evas *evas) -{ - Eina_List *l; - Eina_List *ll; - Eina_List *available = NULL; - char *dir; - -#ifdef HAVE_FONTCONFIG - /* Add font config fonts */ - FcPattern *p; - FcFontSet *set = NULL; - FcObjectSet *os; - int i; - - evas_font_init(); - - p = FcPatternCreate(); - os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); - - if (p && os) set = FcFontList(NULL, p, os); - - if (p) FcPatternDestroy(p); - if (os) FcObjectSetDestroy(os); - - if (set) - { - for (i = 0; i < set->nfont; i++) - { - char *font; - - font = (char *)FcNameUnparse(set->fonts[i]); - available = eina_list_append(available, eina_stringshare_add(font)); - free(font); - } - - FcFontSetDestroy(set); - } -#endif - - /* Add fonts in evas font_path*/ - if (!evas->font_path) - return available; - - if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); - - EINA_LIST_FOREACH(evas->font_path, l, dir) - { - Evas_Font_Dir *fd; - - fd = eina_hash_find(font_dirs, dir); - fd = object_text_font_cache_dir_update(dir, fd); - if (fd && fd->aliases) - { - Evas_Font_Alias *fa; - - EINA_LIST_FOREACH(fd->aliases, ll, fa) - available = eina_list_append(available, eina_stringshare_add((char *)fa->alias)); - } - } - - return available; -} - -void -evas_font_dir_available_list_free(Eina_List *available) -{ - while (available) - { - eina_stringshare_del(available->data); - available = eina_list_remove(available, available->data); - } -} - -/* private stuff */ -static Eina_Bool -font_cache_dir_free(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__) -{ - object_text_font_cache_dir_del((char *) key, data); - return 1; -} - -static Evas_Font_Dir * -object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd) -{ - DATA64 mt; - char *tmp; - - if (fd) - { - mt = evas_file_modified_time(dir); - if (mt != fd->dir_mod_time) - { - object_text_font_cache_dir_del(dir, fd); - eina_hash_del(font_dirs, dir, fd); - } - else - { - tmp = evas_file_path_join(dir, "fonts.dir"); - if (tmp) - { - mt = evas_file_modified_time(tmp); - free(tmp); - if (mt != fd->fonts_dir_mod_time) - { - object_text_font_cache_dir_del(dir, fd); - eina_hash_del(font_dirs, dir, fd); - } - else - { - tmp = evas_file_path_join(dir, "fonts.alias"); - if (tmp) - { - mt = evas_file_modified_time(tmp); - free(tmp); - } - if (mt != fd->fonts_alias_mod_time) - { - object_text_font_cache_dir_del(dir, fd); - eina_hash_del(font_dirs, dir, fd); - } - else - return fd; - } - } - } - } - return object_text_font_cache_dir_add(dir); -} - -static Evas_Font * -object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font) -{ - Eina_List *l; - char font_prop[14][256]; - int num; - Evas_Font *fn; - - num = evas_object_text_font_string_parse(font, font_prop); - if (num != 14) return NULL; - EINA_LIST_FOREACH(fd->fonts, l, fn) - { - if (fn->type == 1) - { - int i; - int match = 0; - - for (i = 0; i < 14; i++) - { - if ((font_prop[i][0] == '*') && (font_prop[i][1] == 0)) - match++; - else - { - if (!strcasecmp(font_prop[i], fn->x.prop[i])) match++; - else break; - } - } - if (match == 14) return fn; - } - } - return NULL; -} - -static Evas_Font * -object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font) -{ - Eina_List *l; - Evas_Font *fn; - - EINA_LIST_FOREACH(fd->fonts, l, fn) - { - if (fn->type == 0) - { - if (!strcasecmp(font, fn->simple.name)) return fn; - } - } - return NULL; -} - -static Evas_Font * -object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font) -{ - Eina_List *l; - Evas_Font_Alias *fa; - - EINA_LIST_FOREACH(fd->aliases, l, fa) - if (!strcasecmp(fa->alias, font)) return fa->fn; - return NULL; -} - -static Evas_Font * -object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font) -{ - Evas_Font *fn; - - fn = eina_hash_find(fd->lookup, font); - if (fn) return fn; - fn = object_text_font_cache_font_find_alias(fd, font); - if (!fn) fn = object_text_font_cache_font_find_x(fd, font); - if (!fn) fn = object_text_font_cache_font_find_file(fd, font); - if (!fn) return NULL; - eina_hash_add(fd->lookup, font, fn); - return fn; -} - -static Evas_Font_Dir * -object_text_font_cache_dir_add(char *dir) -{ - Evas_Font_Dir *fd; - char *tmp, *tmp2; - Eina_List *fdir; - Evas_Font *fn; - - fd = calloc(1, sizeof(Evas_Font_Dir)); - if (!fd) return NULL; - fd->lookup = eina_hash_string_superfast_new(NULL); - - eina_hash_add(font_dirs, dir, fd); - - /* READ fonts.alias, fonts.dir and directory listing */ - - /* fonts.dir */ - tmp = evas_file_path_join(dir, "fonts.dir"); - if (tmp) - { - FILE *f; - - f = fopen(tmp, "rb"); - if (f) - { - int num; - char fname[4096], fdef[4096]; - - if (fscanf(f, "%i\n", &num) != 1) goto cant_read; - /* read font lines */ - while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) - { - char font_prop[14][256]; - int i; - - /* skip comments */ - if ((fdef[0] == '!') || (fdef[0] == '#')) continue; - /* parse font def */ - num = evas_object_text_font_string_parse((char *)fdef, font_prop); - if (num == 14) - { - fn = calloc(1, sizeof(Evas_Font)); - if (fn) - { - fn->type = 1; - for (i = 0; i < 14; i++) - fn->x.prop[i] = eina_stringshare_add(font_prop[i]); - tmp2 = evas_file_path_join(dir, fname); - if (tmp2) - { - fn->path = eina_stringshare_add(tmp2); - free(tmp2); - } - fd->fonts = eina_list_append(fd->fonts, fn); - } - } - } - cant_read: ; - fclose(f); - } - free(tmp); - } - - /* directoy listing */ - fdir = evas_file_path_list(dir, "*.ttf", 0); - while (fdir) - { - tmp = evas_file_path_join(dir, fdir->data); - if (tmp) - { - fn = calloc(1, sizeof(Evas_Font)); - if (fn) - { - char *p; - - fn->type = 0; - tmp2 = alloca(strlen(fdir->data) + 1); - strcpy(tmp2, fdir->data); - p = strrchr(tmp2, '.'); - if (p) *p = 0; - fn->simple.name = eina_stringshare_add(tmp2); - tmp2 = evas_file_path_join(dir, fdir->data); - if (tmp2) - { - fn->path = eina_stringshare_add(tmp2); - free(tmp2); - } - fd->fonts = eina_list_append(fd->fonts, fn); - } - free(tmp); - } - free(fdir->data); - fdir = eina_list_remove(fdir, fdir->data); - } - - /* fonts.alias */ - tmp = evas_file_path_join(dir, "fonts.alias"); - if (tmp) - { - FILE *f; - - f = fopen(tmp, "rb"); - if (f) - { - char fname[4096], fdef[4096]; - - /* read font alias lines */ - while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) - { - Evas_Font_Alias *fa; - - /* skip comments */ - if ((fname[0] == '!') || (fname[0] == '#')) continue; - fa = calloc(1, sizeof(Evas_Font_Alias)); - if (fa) - { - fa->alias = eina_stringshare_add(fname); - fa->fn = object_text_font_cache_font_find_x(fd, fdef); - if ((!fa->alias) || (!fa->fn)) - { - if (fa->alias) eina_stringshare_del(fa->alias); - free(fa); - } - else - fd->aliases = eina_list_append(fd->aliases, fa); - } - } - fclose(f); - } - free(tmp); - } - - fd->dir_mod_time = evas_file_modified_time(dir); - tmp = evas_file_path_join(dir, "fonts.dir"); - if (tmp) - { - fd->fonts_dir_mod_time = evas_file_modified_time(tmp); - free(tmp); - } - tmp = evas_file_path_join(dir, "fonts.alias"); - if (tmp) - { - fd->fonts_alias_mod_time = evas_file_modified_time(tmp); - free(tmp); - } - - return fd; -} - -static void -object_text_font_cache_dir_del(char *dir __UNUSED__, Evas_Font_Dir *fd) -{ - if (fd->lookup) eina_hash_free(fd->lookup); - while (fd->fonts) - { - Evas_Font *fn; - int i; - - fn = fd->fonts->data; - fd->fonts = eina_list_remove(fd->fonts, fn); - for (i = 0; i < 14; i++) - { - if (fn->x.prop[i]) eina_stringshare_del(fn->x.prop[i]); - } - if (fn->simple.name) eina_stringshare_del(fn->simple.name); - if (fn->path) eina_stringshare_del(fn->path); - free(fn); - } - while (fd->aliases) - { - Evas_Font_Alias *fa; - - fa = fd->aliases->data; - fd->aliases = eina_list_remove(fd->aliases, fa); - if (fa->alias) eina_stringshare_del(fa->alias); - free(fa); - } - free(fd); -} - -static int -evas_object_text_font_string_parse(char *buffer, char dest[14][256]) -{ - char *p; - int n, m, i; - - n = 0; - m = 0; - p = buffer; - if (p[0] != '-') return 0; - i = 1; - while (p[i]) - { - dest[n][m] = p[i]; - if ((p[i] == '-') || (m == 255)) - { - dest[n][m] = 0; - n++; - m = -1; - } - i++; - m++; - if (n == 14) return n; - } - dest[n][m] = 0; - n++; - return n; -} - -EAPI void -evas_font_path_clear(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - while (e->font_path) - { - eina_stringshare_del(e->font_path->data); - e->font_path = eina_list_remove(e->font_path, e->font_path->data); - } -} - -EAPI void -evas_font_path_append(Evas *e, const char *path) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (!path) return; - e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path)); -} - -EAPI void -evas_font_path_prepend(Evas *e, const char *path) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (!path) return; - e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path)); -} - -EAPI const Eina_List * -evas_font_path_list(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - return e->font_path; -} - -static void -evas_font_object_rehint(Evas_Object *obj) -{ - if (obj->smart.smart) - { - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj) - evas_font_object_rehint(obj); - } - else - { - if (!strcmp(obj->type, "text")) - _evas_object_text_rehint(obj); - if (!strcmp(obj->type, "textblock")) - _evas_object_textblock_rehint(obj); - } -} - -EAPI void -evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) -{ - Evas_Layer *lay; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (e->hinting == hinting) return; - e->hinting = hinting; - - EINA_INLIST_FOREACH(e->layers, lay) - { - Evas_Object *obj; - - EINA_INLIST_FOREACH(lay->objects, obj) - evas_font_object_rehint(obj); - } -} - -EAPI Evas_Font_Hinting_Flags -evas_font_hinting_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return EVAS_FONT_HINTING_BYTECODE; - MAGIC_CHECK_END(); - return e->hinting; -} - -EAPI Eina_Bool -evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (e->engine.func->font_hinting_can_hint) - return e->engine.func->font_hinting_can_hint(e->engine.data.output, - hinting); - return EINA_FALSE; -} - -EAPI void -evas_font_cache_flush(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - e->engine.func->font_cache_flush(e->engine.data.output); -} - -EAPI void -evas_font_cache_set(Evas *e, int size) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (size < 0) size = 0; - e->engine.func->font_cache_set(e->engine.data.output, size); -} - -EAPI int -evas_font_cache_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - - return e->engine.func->font_cache_get(e->engine.data.output); -} - -EAPI Eina_List * -evas_font_available_list(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - - return evas_font_dir_available_list(e); -} - -EAPI void -evas_font_available_list_free(Evas *e, Eina_List *available) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - evas_font_dir_available_list_free(available); -} - diff --git a/libraries/evas/src/lib/canvas/evas_gl.c b/libraries/evas/src/lib/canvas/evas_gl.c deleted file mode 100644 index 85ed851..0000000 --- a/libraries/evas/src/lib/canvas/evas_gl.c +++ /dev/null @@ -1,272 +0,0 @@ -/* 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 -{ - DATA32 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; - - if (!evas_gl->evas->engine.func->gl_context_create) - { - ERR("GL engine not available\n"); - free(evas_gl); - return NULL; - } - - 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); - - evas_gl->magic = 0; - free(evas_gl); -} - -EAPI Evas_GL_Config * -evas_gl_config_new() -{ - Evas_GL_Config *cfg; - - cfg = calloc(1, sizeof(Evas_GL_Config)); - - if (!cfg) return NULL; - - return cfg; -} - -EAPI void -evas_gl_config_free(Evas_GL_Config *cfg) -{ - if (cfg) free(cfg); -} - -EAPI Evas_GL_Surface * -evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) -{ - Evas_GL_Surface *surf; - - MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); - return NULL; - MAGIC_CHECK_END(); - - if (!config) - { - ERR("Invalid Config\n"); - return NULL; - } - - surf = calloc(1, sizeof(Evas_GL_Surface)); - - if (!surf) return NULL; - - surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); - - if (!surf->data) - { - 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 const char * -evas_gl_string_query(Evas_GL *evas_gl, int name) -{ - MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); - return EINA_FALSE; - MAGIC_CHECK_END(); - - return (const char *)evas_gl->evas->engine.func->gl_string_query(evas_gl->evas->engine.data.output, name); -} - -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); - -} diff --git a/libraries/evas/src/lib/canvas/evas_key.c b/libraries/evas/src/lib/canvas/evas_key.c deleted file mode 100644 index f74ef34..0000000 --- a/libraries/evas/src/lib/canvas/evas_key.c +++ /dev/null @@ -1,245 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* private calls */ - -static int -evas_key_modifier_number(const Evas_Modifier *m, const char *keyname) -{ - int i; - - for (i = 0; i < m->mod.count; i++) - { - if (!strcmp(m->mod.list[i], keyname)) return i; - } - return -1; -} - -static int -evas_key_lock_number(const Evas_Lock *l, const char *keyname) -{ - int i; - - for (i = 0; i < l->lock.count; i++) - { - if (!strcmp(l->lock.list[i], keyname)) return i; - } - return -1; -} - -/* local calls */ - -/* public calls */ - -EAPI const Evas_Modifier * -evas_key_modifier_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - return &(e->modifiers); -} - -EAPI const Evas_Lock * -evas_key_lock_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - return &(e->locks); -} - -EAPI Eina_Bool -evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - if (!m) return 0; - if (!keyname) return 0; - n = evas_key_modifier_number(m, keyname); - if (n < 0) return 0; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - if (m->mask & num) return 1; - return 0; -} - -EAPI Eina_Bool -evas_key_lock_is_set(const Evas_Lock *l, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - if (!l) return 0; - if (!keyname) return 0; - n = evas_key_lock_number(l, keyname); - if (n < 0) return 0; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - if (l->mask & num) return 1; - return 0; -} - -EAPI void -evas_key_modifier_add(Evas *e, const char *keyname) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - if (e->modifiers.mod.count >= 64) return; - evas_key_modifier_del(e, keyname); - e->modifiers.mod.count++; - e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *)); - e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname); - e->modifiers.mask = 0; -} - -EAPI void -evas_key_modifier_del(Evas *e, const char *keyname) -{ - int i; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - for (i = 0; i < e->modifiers.mod.count; i++) - { - if (!strcmp(e->modifiers.mod.list[i], keyname)) - { - int j; - - free(e->modifiers.mod.list[i]); - e->modifiers.mod.count--; - for (j = i; j < e->modifiers.mod.count; j++) - e->modifiers.mod.list[j] = e->modifiers.mod.list[j + 1]; - e->modifiers.mask = 0; - return; - } - } -} - -EAPI void -evas_key_lock_add(Evas *e, const char *keyname) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - if (e->locks.lock.count >= 64) return; - evas_key_lock_del(e, keyname); - e->locks.lock.count++; - e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *)); - e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname); - e->locks.mask = 0; -} - -EAPI void -evas_key_lock_del(Evas *e, const char *keyname) -{ - int i; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - e->locks.mask = 0; - for (i = 0; i < e->locks.lock.count; i++) - { - if (!strcmp(e->locks.lock.list[i], keyname)) - { - int j; - - free(e->locks.lock.list[i]); - e->locks.lock.count--; - for (j = i; j < e->locks.lock.count; j++) - e->locks.lock.list[j] = e->locks.lock.list[j + 1]; - e->locks.mask = 0; - return; - } - } -} - -EAPI void -evas_key_modifier_on(Evas *e, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname); - if (n < 0) return; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - e->modifiers.mask |= num; -} - -EAPI void -evas_key_modifier_off(Evas *e, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - n = evas_key_modifier_number(&(e->modifiers), keyname); - if (n < 0) return; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - e->modifiers.mask &= ~num; -} - -EAPI void -evas_key_lock_on(Evas *e, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - n = evas_key_lock_number(&(e->locks), keyname); - if (n < 0) return; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - e->locks.mask |= num; -} - -EAPI void -evas_key_lock_off(Evas *e, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - n = evas_key_lock_number(&(e->locks), keyname); - if (n < 0) return; - num = (Evas_Modifier_Mask)n; - num = 1 << num; - e->locks.mask &= ~num; -} - -/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */ - -EAPI Evas_Modifier_Mask -evas_key_modifier_mask_get(const Evas *e, const char *keyname) -{ - Evas_Modifier_Mask num; - int n; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (!keyname) return 0; - n = evas_key_modifier_number(&(e->modifiers), keyname); - if (n < 0) return 0; - num = (Evas_Modifier_Mask)n; - return 1 << num; -} diff --git a/libraries/evas/src/lib/canvas/evas_key_grab.c b/libraries/evas/src/lib/canvas/evas_key_grab.c deleted file mode 100644 index 3fc2172..0000000 --- a/libraries/evas/src/lib/canvas/evas_key_grab.c +++ /dev/null @@ -1,179 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* private calls */ - -/* FIXME: this is not optimal, but works. i should have a hash of keys per */ -/* Evas and then a linked lists of grabs for that key and what */ -/* modifiers/not_modifers they use */ - -static Evas_Key_Grab *evas_key_grab_new (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); -static Evas_Key_Grab *evas_key_grab_find (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); - -static Evas_Key_Grab * -evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) -{ - /* MEM OK */ - Evas_Key_Grab *g; - - g = evas_mem_calloc(sizeof(Evas_Key_Grab)); - if (!g) return NULL; - g->object = obj; - g->modifiers = modifiers; - g->not_modifiers = not_modifiers; - g->exclusive = exclusive; - g->keyname = strdup(keyname); - if (obj->layer->evas->walking_grabs) - g->just_added = EINA_TRUE; - if (!g->keyname) - { - if (!evas_mem_free(strlen(keyname) + 1)) - { - free(g); - return NULL; - } - g->keyname = strdup(keyname); - if (!g->keyname) - { - free(g); - return NULL; - } - } - g->object->grabs = eina_list_append(g->object->grabs, g); - if (eina_error_get()) - { - MERR_BAD(); - evas_mem_free(sizeof(Eina_List)); - g->object->grabs = eina_list_append(g->object->grabs, g); - if (eina_error_get()) - { - MERR_FATAL(); - free(g->keyname); - free(g); - return NULL; - } - } - obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); - if (eina_error_get()) - { - MERR_BAD(); - evas_mem_free(sizeof(Eina_List)); - obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); - if (eina_error_get()) - { - MERR_FATAL(); - g->object->grabs = eina_list_remove(g->object->grabs, g); - free(g->keyname); - free(g); - return NULL; - } - } - return g; -} - -static Evas_Key_Grab * -evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) -{ - /* MEM OK */ - Eina_List *l; - Evas_Key_Grab *g; - - EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g) - { - if ((g->modifiers == modifiers) && - (g->not_modifiers == not_modifiers) && - (!strcmp(g->keyname, keyname))) - { - if ((exclusive) || (obj == g->object)) return g; - } - } - return NULL; -} - -/* local calls */ - -void -evas_object_grabs_cleanup(Evas_Object *obj) -{ - if (obj->layer->evas->walking_grabs) - { - Eina_List *l; - Evas_Key_Grab *g; - - EINA_LIST_FOREACH(obj->grabs, l, g) - g->delete_me = EINA_TRUE; - } - else - { - while (obj->grabs) - { - Evas_Key_Grab *g = obj->grabs->data; - if (g->keyname) free(g->keyname); - free(g); - obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, - g); - obj->grabs = eina_list_remove(obj->grabs, g); - } - } -} - -void -evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) -{ - /* MEM OK */ - Evas_Key_Grab *g; - - g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); - if (!g) return; - g->object->grabs = eina_list_remove(g->object->grabs, g); - obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g); - if (g->keyname) free(g->keyname); - free(g); -} - -/* public calls */ - -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) -{ - /* MEM OK */ - Evas_Key_Grab *g; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - if (!keyname) return EINA_FALSE; - if (exclusive) - { - g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, - exclusive); - if (g) return EINA_FALSE; - } - g = evas_key_grab_new(obj, keyname, modifiers, not_modifiers, exclusive); - if (!g) return EINA_FALSE; - return EINA_TRUE; -} - -EAPI void -evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) -{ - /* MEM OK */ - Evas_Key_Grab *g; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!keyname) return; - g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); - if (!g) return; - if (g->object->layer->evas->walking_grabs) - { - if (!g->delete_me) - { - g->object->layer->evas->delete_grabs++; - g->delete_me = EINA_TRUE; - } - } - else - evas_key_grab_free(g->object, keyname, modifiers, not_modifiers); -} diff --git a/libraries/evas/src/lib/canvas/evas_layer.c b/libraries/evas/src/lib/canvas/evas_layer.c deleted file mode 100644 index 54e9907..0000000 --- a/libraries/evas/src/lib/canvas/evas_layer.c +++ /dev/null @@ -1,193 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -static void _evas_layer_free(Evas_Layer *lay); - -void -evas_object_inject(Evas_Object *obj, Evas *e) -{ - Evas_Layer *lay; - - if (obj->in_layer) return; - lay = evas_layer_find(e, obj->cur.layer); - if (!lay) - { - lay = evas_layer_new(e); - lay->layer = obj->cur.layer; - evas_layer_add(lay); - } - lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj)); - lay->usage++; - obj->layer = lay; - obj->in_layer = 1; -} - -void -evas_object_release(Evas_Object *obj, int clean_layer) -{ - if (!obj->in_layer) return; - obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); - obj->layer->usage--; - if (clean_layer) - { - if (obj->layer->usage <= 0) - { - evas_layer_del(obj->layer); - _evas_layer_free(obj->layer); - } - } - obj->layer = NULL; - obj->in_layer = 0; -} - -Evas_Layer * -evas_layer_new(Evas *e) -{ - Evas_Layer *lay; - - lay = calloc(1, sizeof(Evas_Layer)); - if (!lay) return NULL; - lay->evas = e; - return lay; -} - -static void -_evas_layer_free(Evas_Layer *lay) -{ - free(lay); -} - -void -evas_layer_pre_free(Evas_Layer *lay) -{ - Evas_Object *obj; - - EINA_INLIST_FOREACH(lay->objects, obj) - { - if ((!obj->smart.parent) && (!obj->delete_me)) - evas_object_del(obj); - } -} - -void -evas_layer_free_objects(Evas_Layer *lay) -{ - while (lay->objects) - { - Evas_Object *obj; - - obj = (Evas_Object *)lay->objects; - evas_object_free(obj, 0); - } -} - -void -evas_layer_clean(Evas *e) -{ - Evas_Layer *tmp; - - while (e->layers) - { - tmp = e->layers; - evas_layer_del(tmp); - _evas_layer_free(tmp); - } -} - -Evas_Layer * -evas_layer_find(Evas *e, short layer_num) -{ - Evas_Layer *layer; - - EINA_INLIST_FOREACH(e->layers, layer) - { - if (layer->layer == layer_num) return layer; - } - return NULL; -} - -void -evas_layer_add(Evas_Layer *lay) -{ - Evas_Layer *layer; - - EINA_INLIST_FOREACH(lay->evas->layers, layer) - { - if (layer->layer > lay->layer) - { - lay->evas->layers = (Evas_Layer *)eina_inlist_prepend_relative(EINA_INLIST_GET(lay->evas->layers), - EINA_INLIST_GET(lay), - EINA_INLIST_GET(layer)); - return; - } - } - lay->evas->layers = (Evas_Layer *)eina_inlist_append(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay)); -} - -void -evas_layer_del(Evas_Layer *lay) -{ - Evas *e; - - e = lay->evas; - e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay)); -} - -/* public functions */ - -EAPI void -evas_object_layer_set(Evas_Object *obj, short l) -{ - Evas *e; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (evas_object_intercept_call_layer_set(obj, l)) return; - if (obj->smart.parent) return; - if (obj->cur.layer == l) - { - evas_object_raise(obj); - return; - } - e = obj->layer->evas; - evas_object_release(obj, 1); - obj->cur.layer = l; - evas_object_inject(obj, e); - obj->restack = 1; - evas_object_change(obj); - if (obj->clip.clipees) - { - evas_object_inform_call_restack(obj); - return; - } - evas_object_change(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) && - obj->cur.visible) - if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj)) - 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_restack(obj); -} - -EAPI short -evas_object_layer_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - if (obj->smart.parent) - { - return obj->smart.parent->cur.layer; - } - return obj->cur.layer; -} diff --git a/libraries/evas/src/lib/canvas/evas_main.c b/libraries/evas/src/lib/canvas/evas_main.c deleted file mode 100644 index 687744f..0000000 --- a/libraries/evas/src/lib/canvas/evas_main.c +++ /dev/null @@ -1,710 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" -#include "evas_cs.h" - -#ifdef LKDEBUG -EAPI Eina_Bool lockdebug = EINA_FALSE; -EAPI int lockmax = 0; -#endif - -static int _evas_init_count = 0; -int _evas_log_dom_global = -1; -EAPI int -evas_init(void) -{ - if (++_evas_init_count != 1) - return _evas_init_count; - -#ifdef LKDEBUG - if (getenv("EVAS_LOCK_DEBUG")) - { - lockdebug = EINA_TRUE; - lockmax = atoi(getenv("EVAS_LOCK_DEBUG")); - } -#endif - -#ifdef HAVE_EVIL - if (!evil_init()) - return --_evas_init_count; -#endif - - if (!eina_init()) - goto shutdown_evil; - - _evas_log_dom_global = eina_log_domain_register - ("evas_main", EVAS_DEFAULT_LOG_COLOR); - if (_evas_log_dom_global < 0) - { - EINA_LOG_ERR("Can not create a module log domain."); - goto shutdown_eina; - } - - evas_module_init(); -#ifdef BUILD_ASYNC_EVENTS - if (!evas_async_events_init()) - goto shutdown_module; -#endif -#ifdef EVAS_CSERVE - if (getenv("EVAS_CSERVE")) evas_cserve_init(); -#endif -#ifdef BUILD_ASYNC_PRELOAD - _evas_preload_thread_init(); -#endif -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_init(); -#endif - - return _evas_init_count; - -#ifdef BUILD_ASYNC_EVENTS - shutdown_module: - evas_module_shutdown(); - eina_log_domain_unregister(_evas_log_dom_global); -#endif - shutdown_eina: - eina_shutdown(); - shutdown_evil: -#ifdef HAVE_EVIL - evil_shutdown(); -#endif - - return --_evas_init_count; -} - -EAPI int -evas_shutdown(void) -{ - if (--_evas_init_count != 0) - return _evas_init_count; - -#ifdef EVAS_FRAME_QUEUING - if (evas_common_frameq_enabled()) - { - evas_common_frameq_finish(); - evas_common_frameq_destroy(); - } -#endif -#ifdef BUILD_ASYNC_EVENTS - _evas_preload_thread_shutdown(); -#endif -#ifdef EVAS_CSERVE - if (getenv("EVAS_CSERVE")) evas_cserve_shutdown(); -#endif -#ifdef BUILD_ASYNC_EVENTS - evas_async_events_shutdown(); -#endif - evas_font_dir_cache_free(); - evas_common_shutdown(); - evas_module_shutdown(); - eina_log_domain_unregister(_evas_log_dom_global); - eina_shutdown(); -#ifdef HAVE_EVIL - evil_shutdown(); -#endif - - return _evas_init_count; -} - - -EAPI Evas * -evas_new(void) -{ - Evas *e; - - e = calloc(1, sizeof(Evas)); - if (!e) return NULL; - - e->magic = MAGIC_EVAS; - e->output.render_method = RENDER_METHOD_INVALID; - e->viewport.w = 1; - e->viewport.h = 1; - e->framespace.x = 0; - e->framespace.y = 0; - e->framespace.w = 0; - e->framespace.h = 0; - e->hinting = EVAS_FONT_HINTING_BYTECODE; - e->name_hash = eina_hash_string_superfast_new(NULL); - eina_clist_init(&e->calc_list); - eina_clist_init(&e->calc_done); - -#define EVAS_ARRAY_SET(E, Array) \ - eina_array_step_set(&E->Array, sizeof (E->Array), 4096); - - EVAS_ARRAY_SET(e, delete_objects); - EVAS_ARRAY_SET(e, active_objects); - EVAS_ARRAY_SET(e, restack_objects); - EVAS_ARRAY_SET(e, render_objects); - EVAS_ARRAY_SET(e, pending_objects); - EVAS_ARRAY_SET(e, obscuring_objects); - EVAS_ARRAY_SET(e, temporary_objects); - EVAS_ARRAY_SET(e, calculate_objects); - EVAS_ARRAY_SET(e, clip_changes); - -#undef EVAS_ARRAY_SET - - return e; -} - -EAPI void -evas_free(Evas *e) -{ - Eina_Rectangle *r; - Evas_Coord_Touch_Point *touch_point; - Evas_Layer *lay; - int i; - int del; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_flush(); -#endif - - if (e->walking_list == 0) evas_render_idle_flush(e); - - if (e->walking_list > 0) return; - - if (e->callbacks) - { - if (e->callbacks->deletions_waiting) return; - - e->callbacks->deletions_waiting = 0; - evas_event_callback_list_post_free(&e->callbacks->callbacks); - if (!e->callbacks->callbacks) - { - free(e->callbacks); - e->callbacks = NULL; - } - - _evas_post_event_callback_free(e); - } - - del = 1; - e->walking_list++; - e->cleanup = 1; - while (del) - { - del = 0; - EINA_INLIST_FOREACH(e->layers, lay) - { - Evas_Object *o; - - evas_layer_pre_free(lay); - - EINA_INLIST_FOREACH(lay->objects, o) - { - if ((o->callbacks) && (o->callbacks->walking_list)) - { - /* Defer free */ - e->delete_me = 1; - e->walking_list--; - return; - } - if (!o->delete_me) - del = 1; - } - } - } - EINA_INLIST_FOREACH(e->layers, lay) - evas_layer_free_objects(lay); - evas_layer_clean(e); - - e->walking_list--; - - evas_font_path_clear(e); - e->pointer.object.in = eina_list_free(e->pointer.object.in); - - if (e->name_hash) eina_hash_free(e->name_hash); - e->name_hash = NULL; - - EINA_LIST_FREE(e->damages, r) - eina_rectangle_free(r); - EINA_LIST_FREE(e->obscures, r) - eina_rectangle_free(r); - - evas_fonts_zero_free(e); - - evas_event_callback_all_del(e); - evas_event_callback_cleanup(e); - - if (e->engine.func) - { - e->engine.func->context_free(e->engine.data.output, e->engine.data.context); - e->engine.func->output_free(e->engine.data.output); - e->engine.func->info_free(e, e->engine.info); - } - - for (i = 0; i < e->modifiers.mod.count; i++) - free(e->modifiers.mod.list[i]); - if (e->modifiers.mod.list) free(e->modifiers.mod.list); - - for (i = 0; i < e->locks.lock.count; i++) - free(e->locks.lock.list[i]); - if (e->locks.lock.list) free(e->locks.lock.list); - - if (e->engine.module) evas_module_unref(e->engine.module); - - eina_array_flush(&e->delete_objects); - eina_array_flush(&e->active_objects); - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->render_objects); - eina_array_flush(&e->pending_objects); - eina_array_flush(&e->obscuring_objects); - eina_array_flush(&e->temporary_objects); - eina_array_flush(&e->calculate_objects); - eina_array_flush(&e->clip_changes); - - EINA_LIST_FREE(e->touch_points, touch_point) - free(touch_point); - - e->magic = 0; - free(e); -} - -EAPI void -evas_output_method_set(Evas *e, int render_method) -{ - Evas_Module *em; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - /* if our engine to set it to is invalid - abort */ - if (render_method == RENDER_METHOD_INVALID) return; - /* if the engine is already set up - abort */ - if (e->output.render_method != RENDER_METHOD_INVALID) return; - /* Request the right engine. */ - em = evas_module_engine_get(render_method); - if (!em) return ; - if (em->id_engine != render_method) return; - if (!evas_module_load(em)) return; - - /* set the correct render */ - e->output.render_method = render_method; - e->engine.func = (em->functions); - evas_module_use(em); - if (e->engine.module) evas_module_unref(e->engine.module); - e->engine.module = em; - evas_module_ref(em); - /* get the engine info struct */ - if (e->engine.func->info) e->engine.info = e->engine.func->info(e); - return; -} - -EAPI int -evas_output_method_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return RENDER_METHOD_INVALID; - MAGIC_CHECK_END(); - - return e->output.render_method; -} - -EAPI Evas_Engine_Info * -evas_engine_info_get(const Evas *e) -{ - Evas_Engine_Info *info; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - - if (!e->engine.info) return NULL; - - info = e->engine.info; - ((Evas *)e)->engine.info_magic = info->magic; - - return info; -} - -EAPI Eina_Bool -evas_engine_info_set(Evas *e, Evas_Engine_Info *info) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return EINA_FALSE; - MAGIC_CHECK_END(); - if (!info) return EINA_FALSE; - if (info != e->engine.info) return EINA_FALSE; - if (info->magic != e->engine.info_magic) return EINA_FALSE; - return (Eina_Bool)e->engine.func->setup(e, info); -} - -EAPI void -evas_output_size_set(Evas *e, int w, int h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if ((w == e->output.w) && (h == e->output.h)) return; - if (w < 1) w = 1; - if (h < 1) h = 1; - -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_flush(); -#endif - - e->output.w = w; - e->output.h = h; - e->output.changed = 1; - e->output_validity++; - e->changed = 1; - evas_render_invalidate(e); -} - -EAPI void -evas_output_size_get(const Evas *e, int *w, int *h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - - if (w) *w = e->output.w; - if (h) *h = e->output.h; -} - -EAPI void -evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if ((x == e->viewport.x) && (y == e->viewport.y) && - (w == e->viewport.w) && (h == e->viewport.h)) return; - if (w <= 0) return; - if (h <= 0) return; - if ((x != 0) || (y != 0)) - { - ERR("Compat error. viewport x,y != 0,0 not supported"); - x = 0; - y = 0; - } - e->viewport.x = x; - e->viewport.y = y; - e->viewport.w = w; - e->viewport.h = h; - e->viewport.changed = 1; - e->output_validity++; - e->changed = 1; -} - -EAPI void -evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - - if (x) *x = e->viewport.x; - if (y) *y = e->viewport.y; - if (w) *w = e->viewport.w; - if (h) *h = e->viewport.h; -} - -EAPI void -evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if ((x == e->framespace.x) && (y == e->framespace.y) && - (w == e->framespace.w) && (h == e->framespace.h)) return; - e->framespace.x = x; - e->framespace.y = y; - e->framespace.w = w; - e->framespace.h = h; - e->framespace.changed = 1; - e->output_validity++; - e->changed = 1; -} - -EAPI void -evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - - if (x) *x = e->framespace.x; - if (y) *y = e->framespace.y; - if (w) *w = e->framespace.w; - if (h) *h = e->framespace.h; -} - -EAPI Evas_Coord -evas_coord_screen_x_to_world(const Evas *e, int x) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (e->output.w == e->viewport.w) return e->viewport.x + x; - return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); -} - -EAPI Evas_Coord -evas_coord_screen_y_to_world(const Evas *e, int y) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (e->output.h == e->viewport.h) return e->viewport.y + y; - return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); -} - -EAPI int -evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (e->output.w == e->viewport.w) return x - e->viewport.x; - return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); -} - -EAPI int -evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - if (e->output.h == e->viewport.h) return y - e->viewport.y; - return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); -} - -EAPI int -evas_render_method_lookup(const char *name) -{ - Evas_Module *em; - - if (!name) return RENDER_METHOD_INVALID; - /* search on the engines list for the name */ - em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); - if (!em) return RENDER_METHOD_INVALID; - - return em->id_engine; -} - -EAPI Eina_List * -evas_render_method_list(void) -{ - return evas_module_engine_list(); -} - -EAPI void -evas_render_method_list_free(Eina_List *list) -{ - eina_list_free(list); -} - -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) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - if (x) *x = e->pointer.x; - if (y) *y = e->pointer.y; -} - -EAPI void -evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - if (x) *x = e->pointer.x; - if (y) *y = e->pointer.y; -} - -EAPI int -evas_pointer_button_down_mask_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return (int)e->pointer.button; -} - -EAPI Eina_Bool -evas_pointer_inside_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return (int)e->pointer.inside; -} - -EAPI void -evas_data_attach_set(Evas *e, void *data) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - e->attach_data = data; -} - -EAPI void * -evas_data_attach_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - return e->attach_data; -} - -EAPI void -evas_focus_in(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (e->focus) return; - e->focus = 1; - evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); -} - -EAPI void -evas_focus_out(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - if (!e->focus) return; - e->focus = 0; - evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); -} - -EAPI Eina_Bool -evas_focus_state_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return e->focus; -} - -EAPI void -evas_nochange_push(Evas *e) -{ - e->nochange++; -} - -EAPI void -evas_nochange_pop(Evas *e) -{ - e->nochange--; -} - -void -_evas_walk(Evas *e) -{ - e->walking_list++; -} - -void -_evas_unwalk(Evas *e) -{ - e->walking_list--; - if ((e->walking_list == 0) && (e->delete_me)) evas_free(e); -} - -EAPI const char * -evas_load_error_str(Evas_Load_Error error) -{ - switch (error) - { - case EVAS_LOAD_ERROR_NONE: - return "No error on load"; - case EVAS_LOAD_ERROR_GENERIC: - return "A non-specific error occurred"; - case EVAS_LOAD_ERROR_DOES_NOT_EXIST: - return "File (or file path) does not exist"; - case EVAS_LOAD_ERROR_PERMISSION_DENIED: - return "Permission deinied to an existing file (or path)"; - case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: - return "Allocation of resources failure prevented load"; - case EVAS_LOAD_ERROR_CORRUPT_FILE: - return "File corrupt (but was detected as a known format)"; - case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: - return "File is not a known format"; - default: - return "Unknown error"; - } -} - -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); -} - -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); -} - -EAPI void -evas_color_argb_premul(int a, int *r, int *g, int *b) -{ - evas_common_convert_color_argb_premul(a, r, g, b); -} - -EAPI void -evas_color_argb_unpremul(int a, int *r, int *g, int *b) -{ - evas_common_convert_color_argb_unpremul(a, r, g, b); -} - -EAPI void -evas_data_argb_premul(unsigned int *data, unsigned int len) -{ - if (!data || (len < 1)) return; - evas_common_convert_argb_premul(data, len); -} - -EAPI void -evas_data_argb_unpremul(unsigned int *data, unsigned int len) -{ - if (!data || (len < 1)) return; - evas_common_convert_argb_unpremul(data, len); -} diff --git a/libraries/evas/src/lib/canvas/evas_map.c b/libraries/evas/src/lib/canvas/evas_map.c deleted file mode 100644 index 5dcb760..0000000 --- a/libraries/evas/src/lib/canvas/evas_map.c +++ /dev/null @@ -1,1037 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" -#include - -static void -_evas_map_calc_geom_change(Evas_Object *obj) -{ - int is, was = 0, pass = 0; - - evas_object_change(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_inform_call_move(obj); - evas_object_inform_call_resize(obj); -} - -static void -_evas_map_calc_map_geometry(Evas_Object *obj) -{ - Evas_Coord x1, x2, yy1, yy2; - const Evas_Map_Point *p, *p_end; - Eina_Bool ch = EINA_FALSE; - - if (!obj->cur.map) return; - - // WARN: Do not merge below code to SLP until it is fixed. - // It has an infinite loop bug. - if (obj->prev.map) - { - // FIXME: this causes an infinite loop somewhere... hard to debug - 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) || - (p->r != p2->r) || - (p->g != p2->g) || - (p->b != p2->b)) - { - 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; - p_end = p + obj->cur.map->count; - x1 = x2 = lround(p->x); - yy1 = yy2 = lround(p->y); - p++; - for (; p < p_end; p++) - { - Evas_Coord x, y; - - x = lround(p->x); - y = lround(p->y); - if (x < x1) x1 = x; - if (x > x2) x2 = x; - if (y < yy1) yy1 = y; - if (y > yy2) yy2 = y; - } -// this causes clip-out bugs now mapped objs canbe opaque!!! -// // add 1 pixel of fuzz around the map region to ensure updates are correct -// x1 -= 1; yy1 -= 1; -// x2 += 1; yy2 += 1; - if (obj->cur.map->normal_geometry.x != x1) ch = 1; - if (obj->cur.map->normal_geometry.y != yy1) ch = 1; - if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; - if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1; - obj->cur.map->normal_geometry.x = x1; - obj->cur.map->normal_geometry.y = yy1; - obj->cur.map->normal_geometry.w = (x2 - x1); - obj->cur.map->normal_geometry.h = (yy2 - yy1); - if (ch) _evas_map_calc_geom_change(obj); -} - -static inline Evas_Map * -_evas_map_new(int count) -{ - int i; - int alloc; - Evas_Map *m; - - /* Adjust allocation such that: at least 4 points, and always an even - * number: this allows the software engine to work efficiently */ - alloc = (count < 4) ? 4 : count; - if (alloc & 0x1) alloc ++; - - m = calloc(1, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point))); - if (!m) return NULL; - m->count = count; - m->persp.foc = 0; - m->alpha = 1; - m->smooth = 1; - m->magic = MAGIC_MAP; - for (i = 0; i < count; i++) - { - m->points[i].r = 255; - m->points[i].g = 255; - m->points[i].b = 255; - m->points[i].a = 255; - } - return m; -} - -static inline Eina_Bool -_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; - } - memcpy(dst->points, src->points, src->count * sizeof(Evas_Map_Point)); - dst->smooth = src->smooth; - dst->alpha = src->alpha; - dst->persp = src->persp; - return EINA_TRUE; -} - -static inline Evas_Map * -_evas_map_dup(const Evas_Map *orig) -{ - Evas_Map *copy = _evas_map_new(orig->count); - if (!copy) return NULL; - memcpy(copy->points, orig->points, orig->count * sizeof(Evas_Map_Point)); - copy->smooth = orig->smooth; - copy->alpha = orig->alpha; - copy->persp = orig->persp; - return copy; -} - -static inline void -_evas_map_free(Evas_Object *obj, Evas_Map *m) -{ - if (obj) - { - if (m->surface) - obj->layer->evas->engine.func->image_map_surface_free - (obj->layer->evas->engine.data.output, m->surface); - } - m->magic = 0; - free(m); -} - -/****************************************************************************/ -/* util functions for manipulating maps, so you don't need to know the math */ -/****************************************************************************/ -static inline void -_evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord y, const Evas_Coord w, const Evas_Coord h, const Evas_Coord z) -{ - Evas_Map_Point *p = m->points; - int i; - - p[0].x = x; - p[0].y = y; - p[0].z = z; - p[0].u = 0.0; - p[0].v = 0.0; - - p[1].x = x + w; - p[1].y = y; - p[1].z = z; - p[1].u = w; - p[1].v = 0.0; - - p[2].x = x + w; - p[2].y = y + h; - p[2].z = z; - p[2].u = w; - p[2].v = h; - - p[3].x = x; - p[3].y = y + h; - 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; - p[i].py = p[i].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) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return EINA_FALSE; - MAGIC_CHECK_END(); - - int i, j, edges, edge[m->count][2], douv; - Evas_Coord xe[2]; - double u[2] = { 0.0, 0.0 }; - double v[2] = { 0.0, 0.0 }; - - if (m->count < 4) return 0; - // FIXME need to handle grab mode and extrapolte coords outside - // map - if (grab) - { - Evas_Coord ymin, ymax; - - ymin = m->points[0].y; - ymax = m->points[0].y; - for (i = 1; i < m->count; i++) - { - if (m->points[i].y < ymin) ymin = m->points[i].y; - else if (m->points[i].y > ymax) ymax = m->points[i].y; - } - if (y <= ymin) y = ymin + 1; - if (y >= ymax) y = ymax - 1; - } - edges = 0; - for (i = 0; i < m->count; i++) - { - j = (i + 1) % m->count; - if ((m->points[i].y <= y) && (m->points[j].y > y)) - { - edge[edges][0] = i; - edge[edges][1] = j; - edges++; - } - else if ((m->points[j].y <= y) && (m->points[i].y > y)) - { - edge[edges][0] = j; - edge[edges][1] = i; - edges++; - } - } - douv = 0; - if ((mx) || (my)) douv = 1; - for (i = 0; i < (edges - 1); i+= 2) - { - Evas_Coord yp, yd; - - j = i + 1; - yd = m->points[edge[i][1]].y - m->points[edge[i][0]].y; - if (yd > 0) - { - yp = y - m->points[edge[i][0]].y; - xe[0] = m->points[edge[i][1]].x - m->points[edge[i][0]].x; - xe[0] = m->points[edge[i][0]].x + ((xe[0] * yp) / yd); - if (douv) - { - u[0] = m->points[edge[i][1]].u - m->points[edge[i][0]].u; - u[0] = m->points[edge[i][0]].u + ((u[0] * yp) / yd); - v[0] = m->points[edge[i][1]].v - m->points[edge[i][0]].v; - v[0] = m->points[edge[i][0]].v + ((v[0] * yp) / yd); - } - } - else - { - xe[0] = m->points[edge[i][0]].x; - if (douv) - { - u[0] = m->points[edge[i][0]].u; - v[0] = m->points[edge[i][0]].v; - } - } - yd = m->points[edge[j][1]].y - m->points[edge[j][0]].y; - if (yd > 0) - { - yp = y - m->points[edge[j][0]].y; - xe[1] = m->points[edge[j][1]].x - m->points[edge[j][0]].x; - xe[1] = m->points[edge[j][0]].x + ((xe[1] * yp) / yd); - if (douv) - { - u[1] = m->points[edge[j][1]].u - m->points[edge[j][0]].u; - u[1] = m->points[edge[j][0]].u + ((u[1] * yp) / yd); - v[1] = m->points[edge[j][1]].v - m->points[edge[j][0]].v; - v[1] = m->points[edge[j][0]].v + ((v[1] * yp) / yd); - } - } - else - { - xe[1] = m->points[edge[j][0]].x; - if (douv) - { - u[1] = m->points[edge[j][0]].u; - v[1] = m->points[edge[j][0]].v; - } - } - if (xe[0] > xe[1]) - { - int ti; - - ti = xe[0]; xe[0] = xe[1]; xe[1] = ti; - if (douv) - { - double td; - - td = u[0]; u[0] = u[1]; u[1] = td; - td = v[0]; v[0] = v[1]; v[1] = td; - } - } - if ((x >= xe[0]) && (x < xe[1])) - { - if (douv) - { - if (mx) - *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / - (xe[1] - xe[0])); - if (my) - *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / - (xe[1] - xe[0])); - } - return EINA_TRUE; - } - if (grab) - { - if (douv) - { - if (mx) - *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / - (xe[1] - xe[0])); - if (my) - *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / - (xe[1] - xe[0])); - } - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -Eina_Bool -evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y) -{ - return evas_map_coords_get(m, x, y, NULL, NULL, 0); -} - -EAPI void -evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - Eina_Bool pchange = EINA_FALSE; - - enabled = !!enabled; - if (obj->cur.usemap == enabled) return; - pchange = obj->changed; - obj->cur.usemap = enabled; - if (enabled) - { - if (!obj->cur.map) - obj->cur.map = _evas_map_new(4); - evas_object_mapped_clip_across_mark(obj); -// obj->cur.map->normal_geometry = obj->cur.geometry; - } - else - { - if (obj->cur.map) - { - _evas_map_calc_geom_change(obj); - evas_object_mapped_clip_across_mark(obj); - //FIXME: Since the last frame is not updated when map is - //disabled, afterimage problem is happened in s/w rendering. - //Need to find out the fundamental reason then fix it. - evas_damage_rectangle_add(obj->layer->evas, - 0, - 0, - obj->layer->evas->output.w, - obj->layer->evas->output.h); - } - } - _evas_map_calc_map_geometry(obj); - /* This is a bit heavy handed, but it fixes the case of same geometry, but - * changed colour or UV settings. */ - evas_object_change(obj); - if (!obj->changed_pchange) obj->changed_pchange = pchange; - obj->changed_map = EINA_TRUE; -} - -EAPI Eina_Bool -evas_object_map_enable_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return obj->cur.usemap; -} - - -EAPI void -evas_object_map_source_set(Evas_Object *obj, Evas_Object *src) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - (void)src; /* method still needs to be implemented. */ -} - -EAPI Evas_Object * -evas_object_map_source_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - return NULL; -} - -EAPI void -evas_object_map_set(Evas_Object *obj, const Evas_Map *map) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (!map) - { - if (obj->cur.map) - { - if (obj->cur.map->surface) - { - obj->layer->evas->engine.func->image_map_surface_free - (obj->layer->evas->engine.data.output, - obj->cur.map->surface); - obj->cur.map->surface = NULL; - } - obj->prev.geometry = obj->cur.map->normal_geometry; - if (!obj->prev.map) - { - _evas_map_free(obj, obj->cur.map); - obj->cur.map = NULL; - evas_object_mapped_clip_across_mark(obj); - return; - } - _evas_map_free(obj, obj->cur.map); - obj->cur.map = NULL; - if (!obj->cur.usemap) _evas_map_calc_geom_change(obj); - else _evas_map_calc_map_geometry(obj); - if (obj->cur.usemap) - { - evas_object_mapped_clip_across_mark(obj); - //FIXME: Since the last frame is not updated when map is - //disabled, afterimage problem is happened in s/w - //rendering. Need to find out the fundamental reason - //then fix it. - evas_damage_rectangle_add(obj->layer->evas, - 0, - 0, - obj->layer->evas->output.w, - obj->layer->evas->output.h); - } - } - return; - } - - if ((obj->cur.map) && (obj->cur.map->count == map->count)) - { - Evas_Map *omap = obj->cur.map; - obj->cur.map = _evas_map_new(map->count); - memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (map->count * sizeof(Evas_Map_Point))); - _evas_map_copy(obj->cur.map, map); - if (obj->prev.map == omap) obj->prev.map = NULL; - free(omap); - } - else - { - 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); - } - _evas_map_calc_map_geometry(obj); -} - -EAPI const Evas_Map * -evas_object_map_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - - return obj->cur.map; -} - -EAPI Evas_Map * -evas_map_new(int count) -{ - if (count != 4) - { - ERR("map point count (%i) != 4 is unsupported!", count); - return NULL; - } - - return _evas_map_new(count); -} - -EAPI void -evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - m->smooth = enabled; -} - -EAPI Eina_Bool -evas_map_smooth_get(const Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return EINA_FALSE; - MAGIC_CHECK_END(); - - return m->smooth; -} - -EAPI void -evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - m->alpha = enabled; -} - -EAPI Eina_Bool -evas_map_alpha_get(const Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return EINA_FALSE; - MAGIC_CHECK_END(); - - return m->alpha; -} - -EAPI Evas_Map * -evas_map_dup(const Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return NULL; - MAGIC_CHECK_END(); - - return _evas_map_dup(m); -} - -EAPI void -evas_map_free(Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - _evas_map_free(NULL, m); -} - -EAPI int -evas_map_count_get(const Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return -1; - MAGIC_CHECK_END(); - - return m->count; -} - -EAPI void -evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p; - - if (idx >= m->count) return; - p = m->points + idx; - p->x = p->px = x; - p->y = p->py = y; - p->z = z; -} - -EAPI void -evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - goto error; - MAGIC_CHECK_END(); - - const Evas_Map_Point *p; - - if (idx >= m->count) goto error; - p = m->points + idx; - if (x) *x = p->x; - if (y) *y = p->y; - if (z) *z = p->z; - return; - - error: - if (x) *x = 0; - if (y) *y = 0; - if (z) *z = 0; -} - -EAPI void -evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p; - - if (idx >= m->count) return; - p = m->points + idx; - p->u = u; - p->v = v; -} - -EAPI void -evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - goto error; - MAGIC_CHECK_END(); - - const Evas_Map_Point *p; - - if (idx >= m->count) goto error; - p = m->points + idx; - if (u) *u = p->u; - if (v) *v = p->v; - return; - - error: - if (u) *u = 0.0; - if (v) *v = 0.0; -} - -EAPI void -evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p; - - if (idx >= m->count) return; - p = m->points + idx; - p->r = r; - p->g = g; - p->b = b; - p->a = a; -} - -EAPI void -evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - const Evas_Map_Point *p; - - if (idx >= m->count) return; - p = m->points + idx; - if (r) *r = p->r; - if (g) *g = p->g; - if (b) *b = p->b; - if (a) *a = p->a; -} - -EAPI void -evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (m->count != 4) - { - 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); -} - -EAPI void -evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (m->count != 4) - { - 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); -} - -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) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - if (m->count != 4) - { - ERR("map has count=%d where 4 was expected.", m->count); - return; - } - _evas_map_util_points_populate(m, x, y, w, h, z); -} - -EAPI void -evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p, *p_end; - - 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; - } -} - -EAPI void -evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - double r = (degrees * M_PI) / 180.0; - Evas_Map_Point *p, *p_end; - - p = m->points; - p_end = p + m->count; - - for (; p < p_end; p++) - { - double x, y, xx, yy; - - x = p->x - cx; - y = p->y - cy; - - xx = x * cos(r); - yy = x * sin(r); - x = xx - (y * sin(r)); - y = yy + (y * cos(r)); - - p->px = p->x = x + cx; - p->py = p->y = y + cy; - } -} - -EAPI void -evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p, *p_end; - - p = m->points; - p_end = p + m->count; - - for (; p < p_end; p++) - { - double x, y; - - x = p->x - cx; - y = p->y - cy; - - x = (((double)x) * zoomx); - y = (((double)y) * zoomy); - - p->px = p->x = x + cx; - p->py = p->y = y + 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) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - double rz = (dz * M_PI) / 180.0; - double rx = (dx * M_PI) / 180.0; - double ry = (dy * M_PI) / 180.0; - Evas_Map_Point *p, *p_end; - - p = m->points; - p_end = p + m->count; - - for (; p < p_end; p++) - { - double x, y, z, xx, yy, zz; - - x = p->x - cx; - y = p->y - cy; - z = p->z - cz; - - if (rz != 0.0) - { - xx = x * cos(rz); - yy = x * sin(rz); - x = xx - (y * sin(rz)); - y = yy + (y * cos(rz)); - } - - if (ry != 0.0) - { - xx = x * cos(ry); - zz = x * sin(ry); - x = xx - (z * sin(ry)); - z = zz + (z * cos(ry)); - } - - if (rx != 0.0) - { - zz = z * cos(rx); - yy = z * sin(rx); - z = zz - (y * sin(rx)); - y = yy + (y * cos(rx)); - } - - p->px = p->x = x + cx; - p->py = p->y = y + cy; - p->z = z + 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) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - int i; - - for (i = 0; i < m->count; i++) - { - double x, y, z; - double nx, ny, nz, x1, yy1, z1, x2, yy2, 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 - - x1 = m->points[h].x - x; - yy1 = m->points[h].y - y; - z1 = m->points[h].z - z; - - x2 = m->points[j].x - x; - yy2 = m->points[j].y - y; - z2 = m->points[j].z - z; - nx = (yy1 * z2) - (z1 * yy2); - ny = (z1 * x2) - (x1 * z2); - nz = (x1 * yy2) - (yy1 * x2); - - ln = (nx * nx) + (ny * ny) + (nz * nz); - ln = sqrt(ln); - - if (ln != 0.0) - { - nx /= ln; - ny /= ln; - nz /= ln; - } - - // calc point -> light vector - 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; - } - 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; - } -} - -EAPI void -evas_map_util_3d_perspective(Evas_Map *m, - Evas_Coord px, Evas_Coord py, - Evas_Coord z0, Evas_Coord foc) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return; - MAGIC_CHECK_END(); - - Evas_Map_Point *p, *p_end; - - p = m->points; - p_end = p + m->count; - - m->persp.px = px; - m->persp.py = py; - m->persp.z0 = z0; - m->persp.foc = foc; - - if (foc <= 0) return; - - for (; p < p_end; p++) - { - double x, y, zz; - - 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; - } -} - -EAPI Eina_Bool -evas_map_util_clockwise_get(Evas_Map *m) -{ - MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); - return EINA_FALSE; - MAGIC_CHECK_END(); - - int i, j, k, count; - long long c; - - if (m->count < 3) return EINA_FALSE; - - count = 0; - for (i = 0; i < m->count; i++) - { - j = (i + 1) % m->count; - k = (i + 2) % m->count; - c = - ((m->points[j].x - m->points[i].x) * - (m->points[k].y - m->points[j].y)) - - - ((m->points[j].y - m->points[i].y) * - (m->points[k].x - m->points[j].x)); - if (c < 0) count--; - else if (c > 0) count++; - } - if (count > 0) return EINA_TRUE; - return EINA_FALSE; -} diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c deleted file mode 100644 index 1a9d20f..0000000 --- a/libraries/evas/src/lib/canvas/evas_name.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -EAPI void -evas_object_name_set(Evas_Object *obj, const char *name) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->name) - { - eina_hash_del(obj->layer->evas->name_hash, obj->name, obj); - free(obj->name); - } - if (!name) obj->name = NULL; - else - { - obj->name = strdup(name); - eina_hash_add(obj->layer->evas->name_hash, obj->name, obj); - } -} - -EAPI const char * -evas_object_name_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - return obj->name; -} - -EAPI Evas_Object * -evas_object_name_find(const Evas *e, const char *name) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - if (!name) return NULL; - return (Evas_Object *)eina_hash_find(e->name_hash, name); -} - -static Evas_Object * -_evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) -{ - const Eina_Inlist *lst; - Evas_Object *child; - - if (!obj->smart.smart) return NULL; - lst = evas_object_smart_members_get_direct(obj); - EINA_INLIST_FOREACH(lst, child) - { - if (child->delete_me) continue; - if (!child->name) continue; - if (!strcmp(name, child->name)) return child; - if (recurse != 0) - { - if ((obj = _evas_object_name_child_find(child, name, recurse - 1))) - return (Evas_Object *)obj; - } - } - return NULL; -} - -EAPI Evas_Object * -evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!name) return NULL; - return _evas_object_name_child_find(obj, name, recurse); -} diff --git a/libraries/evas/src/lib/canvas/evas_object_box.c b/libraries/evas/src/lib/canvas/evas_object_box.c deleted file mode 100644 index 228d37c..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_box.c +++ /dev/null @@ -1,2127 +0,0 @@ -#include "evas_common.h" - -#ifdef _WIN32_WCE -# undef remove -#endif - -typedef struct _Evas_Object_Box_Iterator Evas_Object_Box_Iterator; -typedef struct _Evas_Object_Box_Accessor Evas_Object_Box_Accessor; - -struct _Evas_Object_Box_Iterator -{ - Eina_Iterator iterator; - - Eina_Iterator *real_iterator; - const Evas_Object *box; -}; - -struct _Evas_Object_Box_Accessor -{ - Eina_Accessor accessor; - - Eina_Accessor *real_accessor; - const Evas_Object *box; -}; - -#define _evas_object_box_type "Evas_Object_Box" -#define SIG_CHILD_ADDED "child,added" -#define SIG_CHILD_REMOVED "child,removed" - -static const Evas_Smart_Cb_Description _signals[] = -{ - {SIG_CHILD_ADDED, ""}, - {SIG_CHILD_REMOVED, ""}, - {NULL, NULL} -}; - - -static void _sizing_eval(Evas_Object *obj); - -#define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \ - Evas_Object_Box_Data *ptr = evas_object_smart_data_get(o) - -#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, ptr) \ - EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ - if (!ptr) \ - { \ - CRIT("no widget data for object %p (%s)", \ - o, evas_object_type_get(o)); \ - fflush(stderr); \ - abort(); \ - return; \ -} - -#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ - EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ - if (!ptr) \ - { \ - CRIT("no widget data for object %p (%s)", \ - o, evas_object_type_get(o)); \ - fflush(stderr); \ - abort(); \ - return val; \ - } - -EVAS_SMART_SUBCLASS_NEW(_evas_object_box_type, _evas_object_box, - Evas_Object_Box_Api, Evas_Smart_Class, - evas_object_smart_clipped_class_get, NULL) - -static Eina_Bool -_evas_object_box_iterator_next(Evas_Object_Box_Iterator *it, void **data) -{ - Evas_Object_Box_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_box_iterator_get_container(Evas_Object_Box_Iterator *it) -{ - return (Evas_Object *)it->box; -} - -static void -_evas_object_box_iterator_free(Evas_Object_Box_Iterator *it) -{ - eina_iterator_free(it->real_iterator); - free(it); -} - -static Eina_Bool -_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, idx, (void *)&opt)) - return EINA_FALSE; - if (data) *data = opt->obj; - return EINA_TRUE; -} - -static Evas_Object * -_evas_object_box_accessor_get_container(Evas_Object_Box_Accessor *it) -{ - return (Evas_Object *)it->box; -} - -static void -_evas_object_box_accessor_free(Evas_Object_Box_Accessor *it) -{ - eina_accessor_free(it->real_accessor); - free(it); -} - -static void -_on_child_resize(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) -{ - Evas_Object *box = data; - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); - if (!priv->layouting) evas_object_smart_changed(box); -} - -static void -_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *o, void *einfo __UNUSED__) -{ - const Evas_Object_Box_Api *api; - Evas_Object *box = data; - - EVAS_OBJECT_BOX_DATA_GET(box, priv); - api = priv->api; - - if ((!api) || (!api->remove)) - { - ERR("no api->remove"); - return; - } - - if (!api->remove(box, priv, o)) - ERR("child removal failed"); - evas_object_smart_changed(box); -} - -static void -_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) -{ - Evas_Object *box = data; - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); - if (!priv->layouting) evas_object_smart_changed(box); -} - -static void -_on_hints_changed(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *o , void *einfo __UNUSED__) -{ - _sizing_eval(o); -} - -static Evas_Object_Box_Option * -_evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - api = priv->api; - if ((!api) || (!api->option_new)) - { - ERR("no api->option_new"); - return NULL; - } - - opt = api->option_new(o, priv, child); - if (!opt) - { - ERR("option_new failed"); - return NULL; - } - - return opt; -} - -static void -_evas_object_box_child_callbacks_unregister(Evas_Object *obj) -{ - evas_object_event_callback_del - (obj, EVAS_CALLBACK_RESIZE, _on_child_resize); - evas_object_event_callback_del - (obj, EVAS_CALLBACK_FREE, _on_child_del); - evas_object_event_callback_del - (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed); -} - -static Evas_Object_Box_Option * -_evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt) -{ - const Evas_Object_Box_Api *api; - Evas_Object *obj = opt->obj; - - api = priv->api; - - if ((!api) || (!api->option_free)) - { - WRN("api->option_free not set (may cause memory leaks, segfaults)"); - return NULL; - } - - evas_object_event_callback_add - (obj, EVAS_CALLBACK_RESIZE, _on_child_resize, o); - evas_object_event_callback_add - (obj, EVAS_CALLBACK_FREE, _on_child_del, o); - evas_object_event_callback_add - (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); - - return opt; -} - -static Evas_Object_Box_Option * -_evas_object_box_option_new_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - - opt = (Evas_Object_Box_Option *)malloc(sizeof(*opt)); - if (!opt) - return NULL; - - opt->obj = child; - - return opt; -} - -static void -_evas_object_box_option_free_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object_Box_Option *opt) -{ - free(opt); -} - -static Evas_Object_Box_Option * -_evas_object_box_append_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - - opt = _evas_object_box_option_new(o, priv, child); - if (!opt) - return NULL; - - priv->children = eina_list_append(priv->children, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); - - return opt; -} - -static Evas_Object_Box_Option * -_evas_object_box_prepend_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - - opt = _evas_object_box_option_new(o, priv, child); - if (!opt) - return NULL; - - priv->children = eina_list_prepend(priv->children, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); - - return opt; -} - -static Evas_Object_Box_Option * -_evas_object_box_insert_before_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) -{ - Eina_List *l; - Evas_Object_Box_Option *opt; - - EINA_LIST_FOREACH(priv->children, l, opt) - { - if (opt->obj == reference) - { - Evas_Object_Box_Option *new_opt; - - new_opt = _evas_object_box_option_new(o, priv, child); - if (!new_opt) - return NULL; - - priv->children = eina_list_prepend_relative - (priv->children, new_opt, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - return new_opt; - } - } - - return NULL; -} - -static Evas_Object_Box_Option * -_evas_object_box_insert_after_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) -{ - Eina_List *l; - Evas_Object_Box_Option *opt; - - EINA_LIST_FOREACH(priv->children, l, opt) - { - if (opt->obj == reference) - { - Evas_Object_Box_Option *new_opt; - - new_opt = _evas_object_box_option_new(o, priv, child); - if (!new_opt) - return NULL; - - priv->children = eina_list_append_relative - (priv->children, new_opt, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - return new_opt; - } - } - - return NULL; -} - -static Evas_Object_Box_Option * -_evas_object_box_insert_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos) -{ - Eina_List *l; - unsigned int i; - - if ((pos == 0) && (eina_list_count(priv->children) == 0)) - { - Evas_Object_Box_Option *new_opt; - - new_opt = _evas_object_box_option_new(o, priv, child); - if (!new_opt) - return NULL; - - priv->children = eina_list_prepend(priv->children, new_opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - return new_opt; - } - - for (l = priv->children, i = 0; l; l = l->next, i++) - { - Evas_Object_Box_Option *opt = l->data; - - if (i == pos) - { - Evas_Object_Box_Option *new_opt; - - new_opt = _evas_object_box_option_new(o, priv, child); - if (!new_opt) - return NULL; - - priv->children = eina_list_prepend_relative - (priv->children, new_opt, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - return new_opt; - } - } - - return NULL; -} - -static Evas_Object * -_evas_object_box_remove_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) -{ - const Evas_Object_Box_Api *api; - Evas_Object_Box_Option *opt; - Eina_List *l; - - api = priv->api; - - if ((!api) || (!api->option_free)) - { - ERR("api->option_free not set (may cause memory leaks, segfaults)"); - return NULL; - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - Evas_Object *obj = opt->obj; - - if (obj == child) - { - priv->children = eina_list_remove(priv->children, opt); - api->option_free(o, priv, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); - - return obj; - } - } - - return NULL; -} - -static Evas_Object * -_evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos) -{ - const Evas_Object_Box_Api *api; - Eina_List *node; - Evas_Object_Box_Option *opt; - Evas_Object *obj; - - api = priv->api; - - if ((!api) || (!api->option_free)) - { - WRN("api->option_free not set (may cause memory leaks, segfaults)"); - return NULL; - } - - node = eina_list_nth_list(priv->children, pos); - if (!node) - { - ERR("No item to be removed at position %d", pos); - return NULL; - } - - opt = node->data; - obj = opt->obj; - - priv->children = eina_list_remove_list(priv->children, node); - api->option_free(o, priv, opt); - priv->children_changed = EINA_TRUE; - evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); - return obj; -} - -static void -_evas_object_box_smart_add(Evas_Object *o) -{ - Evas_Object_Box_Data *priv; - - priv = evas_object_smart_data_get(o); - if (!priv) - { - const Evas_Smart *smart; - const Evas_Smart_Class *sc; - - priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv)); - if (!priv) - { - ERR("Could not allocate object private data."); - return; - } - - smart = evas_object_smart_smart_get(o); - sc = evas_smart_class_get(smart); - priv->api = (const Evas_Object_Box_Api *)sc; - - evas_object_smart_data_set(o, priv); - } - _evas_object_box_parent_sc->add(o); - - - evas_object_event_callback_add - (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o); - priv->children = NULL; - priv->align.h = 0.5; - priv->align.v = 0.5; - priv->pad.h = 0; - priv->pad.v = 0; - priv->layout.cb = evas_object_box_layout_horizontal; - priv->layout.data = NULL; - priv->layout.free_data = NULL; -} - -static void -_evas_object_box_smart_del(Evas_Object *o) -{ - const Evas_Object_Box_Api *api; - Eina_List *l; - - EVAS_OBJECT_BOX_DATA_GET(o, priv); - - api = priv->api; - if ((!api) || (!api->option_free)) - { - WRN("api->option_free not set (may cause memory leaks, segfaults)"); - return; - } - - l = priv->children; - while (l) - { - Evas_Object_Box_Option *opt = l->data; - - _evas_object_box_child_callbacks_unregister(opt->obj); - api->option_free(o, priv, opt); - l = eina_list_remove_list(l, l); - } - - if (priv->layout.data && priv->layout.free_data) - priv->layout.free_data(priv->layout.data); - - _evas_object_box_parent_sc->del(o); -} - -static void -_evas_object_box_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_box_smart_calculate(Evas_Object *o) -{ - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); - if (priv->layout.cb) - { - priv->layouting = 1; - priv->layout.cb(o, priv, priv->layout.data); - priv->layouting = 0; - priv->children_changed = EINA_FALSE; - } - else - ERR("No layout function set for %p box.", o); -} - -static void -_evas_object_box_smart_set_user(Evas_Object_Box_Api *api) -{ - api->base.add = _evas_object_box_smart_add; - api->base.del = _evas_object_box_smart_del; - api->base.resize = _evas_object_box_smart_resize; - api->base.calculate = _evas_object_box_smart_calculate; - api->base.callbacks = _signals; - - api->append = _evas_object_box_append_default; - api->prepend = _evas_object_box_prepend_default; - api->insert_before = _evas_object_box_insert_before_default; - api->insert_after = _evas_object_box_insert_after_default; - api->insert_at = _evas_object_box_insert_at_default; - api->remove = _evas_object_box_remove_default; - api->remove_at = _evas_object_box_remove_at_default; - api->option_new = _evas_object_box_option_new_default; - api->option_free = _evas_object_box_option_free_default; -} - -EAPI Evas_Object * -evas_object_box_add(Evas *evas) -{ - return evas_object_smart_add(evas, _evas_object_box_smart_class_new()); -} - -EAPI Evas_Object * -evas_object_box_add_to(Evas_Object *parent) -{ - Evas *evas; - Evas_Object *o; - - evas = evas_object_evas_get(parent); - o = evas_object_box_add(evas); - evas_object_smart_member_add(o, parent); - return o; -} - -EAPI void -evas_object_box_smart_set(Evas_Object_Box_Api *api) -{ - if (!api) - return; - _evas_object_box_smart_set(api); -} - -EAPI const Evas_Object_Box_Api * -evas_object_box_smart_class_get(void) -{ - static Evas_Object_Box_Api _sc = - EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(_evas_object_box_type); - static const Evas_Object_Box_Api *class = NULL; - - if (class) - return class; - - evas_object_box_smart_set(&_sc); - class = &_sc; - - return class; -} - -EAPI void -evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) -{ - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); - - if ((priv->layout.cb == cb) && (priv->layout.data == data) && - (priv->layout.free_data == free_data)) - return; - - if (priv->layout.data && priv->layout.free_data) - priv->layout.free_data(priv->layout.data); - - priv->layout.cb = cb; - priv->layout.data = (void *)data; - priv->layout.free_data = free_data; - evas_object_smart_changed(o); -} - -static void -_fixed_point_divide_and_decompose_integer(int dividend, int divisor, int *int_part, int *frac_part) -{ - int quotient = (long long)(dividend << 16) / divisor; - *frac_part = quotient & 0xffff; - *int_part = quotient >> 16; -} - -static void -_layout_dimension_change_min_max_cell_bound(int dim, int *new_dim, int min_d, int max_d, int cell_sz) -{ - if (dim > cell_sz) - { - if ((min_d != 0) && (cell_sz < min_d)) - *new_dim = min_d; - else - *new_dim = cell_sz; - } - else - { - if ((max_d != -1) && (cell_sz > max_d)) - *new_dim = max_d; - else - *new_dim = cell_sz; - } -} - -static void -_layout_set_offset_and_expand_dimension_space_max_bounded(int dim, int *new_dim, int space_sz, int max_dim, int *offset, double align, int pad_before, int pad_after) -{ - if (align >= 0.0) - { - *new_dim = dim; - *offset = (space_sz - (dim + pad_before + pad_after)) * align - + pad_before; - } - else - { - if ((max_dim != -1) && (space_sz > max_dim)) - { - *new_dim = max_dim; - *offset = (space_sz - (max_dim + pad_before + pad_after)) * 0.5 - + pad_before; - } - else - { - *new_dim = space_sz; - *offset = 0; - } - } -} - -static void -_layout_set_offset_and_change_dimension_min_max_cell_bounded(int dim, int *new_dim, int min_dim, int max_dim, int cell_sz, int *offset, double align, int pad_before, int pad_after) -{ - if (align >= 0.0) - { - *new_dim = dim; - *offset = - (cell_sz - (dim + pad_before + pad_after)) * align + pad_before; - } - else - { - *offset = pad_before; - _layout_dimension_change_min_max_cell_bound - (dim, new_dim, min_dim, max_dim, cell_sz - pad_before - pad_after); - } -} - -static void -_sizing_eval(Evas_Object *obj) -{ - Evas_Coord minw, minh, maxw, maxh; - Evas_Coord w, h; - - evas_object_size_hint_min_get(obj, &minw, &minh); - evas_object_size_hint_max_get(obj, &maxw, &maxh); - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - - if (w < minw) w = minw; - if (h < minh) h = minh; - if ((maxw >= 0) && (w > maxw)) w = maxw; - if ((maxh >= 0) && (h > maxh)) h = maxh; - - evas_object_resize(obj, w, h); -} - -static int -_evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total) -{ - int rem_diff = 0; - int i; - - for (i = 0; i < n_objects; i++) - { - Evas_Object_Box_Option *opt = objects[i]; - Evas_Object *o = opt->obj; - int h; - - evas_object_geometry_get(o, NULL, NULL, NULL, &h); - - if (remaining <= 0) - { - int min_w; - - evas_object_size_hint_min_get(o, &min_w, NULL); - evas_object_resize(o, min_w, h); - } - else - { - double normal_weight, weight_x; - int target_size; - int max_w; - - evas_object_size_hint_weight_get(o, &weight_x, NULL); - normal_weight = weight_x / weight_total; - target_size = (int)((double)remaining * normal_weight); - - evas_object_size_hint_max_get(o, &max_w, NULL); - if ((max_w != -1) && (target_size > max_w)) - { - evas_object_resize(o, max_w, h); - rem_diff += max_w; - objects[i] = objects[n_objects - 1]; - weight_total -= weight_x; - n_objects--; - return _evas_object_box_layout_horizontal_weight_apply - (priv, objects, n_objects, remaining - rem_diff, - weight_total); - } - else - { - evas_object_resize(o, target_size, h); - rem_diff += target_size; - } - } - } - - return remaining - rem_diff; -} - -EAPI void -evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int pad_inc = 0, sub_pixel = 0; - int req_w, global_pad, remaining, top_h = 0; - double weight_total = 0.0; - int weight_use = 0; - int x, y, w, h; - int n_children; - Evas_Object_Box_Option *opt; - Evas_Object_Box_Option **objects; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); - if (!objects) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - global_pad = priv->pad.h; - req_w = global_pad * (n_children - 1); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int padding_l, padding_r; - double weight_x; - - _sizing_eval(opt->obj); - evas_object_size_hint_weight_get(opt->obj, &weight_x, NULL); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, NULL, NULL); - req_w += padding_l + padding_r; - - if (!weight_x) - { - int child_w; - - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); - req_w += child_w; - } - else - { - objects[weight_use] = opt; - weight_use++; - weight_total += weight_x; - } - } - - remaining = w - req_w; - - if (weight_use) - remaining = _evas_object_box_layout_horizontal_weight_apply - (priv, objects, weight_use, remaining, weight_total); - - if (priv->align.h >= 0.0) - x += remaining * priv->align.h; - else if (n_children == 1) - x += remaining / 2; - else - { /* justified */ - _fixed_point_divide_and_decompose_integer - (remaining, n_children - 1, &global_pad, &pad_inc); - global_pad += priv->pad.h; - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, max_h, new_h, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_y; - - evas_object_size_hint_align_get(opt->obj, NULL, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, NULL, &max_h); - - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - off_x = padding_l; - new_h = child_h; - if (new_h > top_h) top_h = new_h; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); - - if (new_h != child_h) - evas_object_resize(opt->obj, child_w, new_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - x += child_w + padding_l + padding_r + global_pad; - sub_pixel += pad_inc; - if (sub_pixel >= 1 << 16) - { - x++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, req_w, top_h); -} - -static int -_evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, int weight_total) -{ - int rem_diff = 0; - int i; - - for (i = 0; i < n_objects; i++) - { - Evas_Object_Box_Option *opt = objects[i]; - Evas_Object *o = opt->obj; - int w; - - evas_object_geometry_get(o, NULL, NULL, &w, NULL); - - if (remaining <= 0) - { - int min_h; - - evas_object_size_hint_min_get(o, NULL, &min_h); - evas_object_resize(o, w, min_h); - } - else - { - double normal_weight, weight_y; - int target_size; - int max_h; - - evas_object_size_hint_weight_get(o, NULL, &weight_y); - normal_weight = weight_y / weight_total; - target_size = (int)((double)remaining * normal_weight); - - evas_object_size_hint_max_get(o, NULL, &max_h); - if ((max_h != -1) && (target_size > max_h)) - { - evas_object_resize(o, w, max_h); - rem_diff += max_h; - objects[i] = objects[n_objects - 1]; - weight_total -= weight_y; - n_objects--; - return _evas_object_box_layout_vertical_weight_apply - (priv, objects, n_objects, remaining - rem_diff, - weight_total); - } - else - { - evas_object_resize(o, w, target_size); - rem_diff += target_size; - } - } - } - - return remaining - rem_diff; -} - -EAPI void -evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int pad_inc = 0, sub_pixel = 0; - int req_h, global_pad, remaining, top_w = 0; - double weight_total = 0.0; - int weight_use = 0; - int x, y, w, h; - int n_children; - Evas_Object_Box_Option *opt; - Evas_Object_Box_Option **objects; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); - if (!objects) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - global_pad = priv->pad.v; - req_h = global_pad * (n_children - 1); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int padding_t, padding_b; - double weight_y; - - _sizing_eval(opt->obj); - evas_object_size_hint_weight_get(opt->obj, NULL, &weight_y); - evas_object_size_hint_padding_get - (opt->obj, NULL, NULL, &padding_t, &padding_b); - req_h += padding_t + padding_b; - - if (!weight_y) - { - int child_h; - - evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); - req_h += child_h; - } - else - { - objects[weight_use] = opt; - weight_use++; - weight_total += weight_y; - } - } - - remaining = h - req_h; - - if (weight_use) - remaining = _evas_object_box_layout_vertical_weight_apply - (priv, objects, weight_use, remaining, weight_total); - - if (priv->align.v >= 0.0) - y += remaining * priv->align.v; - else if (n_children == 1) - y += remaining / 2; - else - { /* justified */ - _fixed_point_divide_and_decompose_integer - (remaining, n_children - 1, &global_pad, &pad_inc); - global_pad += priv->pad.v; - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, max_w, new_w, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_x; - - evas_object_size_hint_align_get(opt->obj, &align_x, NULL); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, &max_w, NULL); - - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - off_y = padding_t; - new_w = child_w; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); - - if (new_w > top_w) top_w = new_w; - - if (new_w != child_w) - evas_object_resize(opt->obj, new_w, child_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - y += child_h + padding_t + padding_b + global_pad; - sub_pixel += pad_inc; - if (sub_pixel >= 1 << 16) - { - y++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, top_w, req_h); -} - -EAPI void -evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int cell_sz, share, inc; - int sub_pixel = 0; - int x, y, w, h; - int n_children; - Evas_Object_Box_Option *opt; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - - share = w - priv->pad.h * (n_children - 1); - _fixed_point_divide_and_decompose_integer - (share, n_children, &cell_sz, &inc); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, max_h, min_w, max_w, new_w, new_h, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_x, align_y; - - evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); - evas_object_size_hint_min_get(opt->obj, &min_w, NULL); - - _sizing_eval(opt->obj); - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - new_w = child_w; - new_h = child_h; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); - - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, - padding_l, padding_r); - - if ((new_w != child_w) || (new_h != child_h)) - evas_object_resize(opt->obj, new_w, new_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - x += cell_sz + priv->pad.h; - sub_pixel += inc; - if (sub_pixel >= 1 << 16) - { - x++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, w, h); -} - -EAPI void -evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int cell_sz, share, inc; - int sub_pixel = 0; - int x, y, w, h; - int n_children; - Evas_Object_Box_Option *opt; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - - share = h - priv->pad.v * (n_children - 1); - _fixed_point_divide_and_decompose_integer - (share, n_children, &cell_sz, &inc); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, max_w, min_h, max_h, new_w, new_h, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_x, align_y; - - evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); - evas_object_size_hint_min_get(opt->obj, NULL, &min_h); - - _sizing_eval(opt->obj); - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - new_w = child_w; - new_h = child_h; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); - - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, - padding_t, padding_b); - - if ((new_w != child_w) || (new_h != child_h)) - evas_object_resize(opt->obj, new_w, new_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - y += cell_sz + priv->pad.v; - sub_pixel += inc; - if (sub_pixel >= 1 << 16) - { - y++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, w, h); -} - -EAPI void -evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int remaining, global_pad, pad_inc = 0, sub_pixel = 0; - int cell_sz = 0; - int x, y, w, h; - int top_h = 0; - int n_children; - Evas_Object_Box_Option *opt; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, padding_l, padding_r; - - _sizing_eval(opt->obj); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, NULL, NULL); - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); - if (child_w + padding_l + padding_r > cell_sz) - cell_sz = child_w + padding_l + padding_r; - } - - global_pad = priv->pad.h; - remaining = w - n_children * cell_sz - global_pad * (n_children - 1); - - if (priv->align.h >= 0.0) - x += remaining * priv->align.h; - else if (n_children == 1) - x += remaining / 2; - else - { /* justified */ - _fixed_point_divide_and_decompose_integer - (remaining, n_children - 1, &global_pad, &pad_inc); - global_pad += priv->pad.h; - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, min_w, max_w, max_h, new_w, new_h, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_x, align_y; - - evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); - evas_object_size_hint_min_get(opt->obj, &min_w, NULL); - - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - new_w = child_w; - new_h = child_h; - if (new_h > top_h) top_h = new_h; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); - - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, - padding_l, padding_r); - - if ((new_w != child_w) || (new_h != child_h)) - evas_object_resize(opt->obj, new_w, new_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - x += cell_sz + global_pad; - sub_pixel += pad_inc; - if (sub_pixel >= 1 << 16) - { - x++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, x, top_h); -} - -EAPI void -evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int remaining, global_pad, pad_inc = 0, sub_pixel = 0; - int cell_sz = 0; - int x, y, w, h; - int top_w = 0; - int n_children; - Evas_Object_Box_Option *opt; - Eina_List *l; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - evas_object_geometry_get(o, &x, &y, &w, &h); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_h, padding_t, padding_b; - - _sizing_eval(opt->obj); - evas_object_size_hint_padding_get - (opt->obj, NULL, NULL, &padding_t, &padding_b); - evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); - if (child_h + padding_t + padding_b > cell_sz) - cell_sz = child_h + padding_t + padding_b; - } - - global_pad = priv->pad.v; - remaining = h - n_children * cell_sz - global_pad * (n_children - 1); - - if (priv->align.v >= 0.0) - y += remaining * priv->align.v; - else if (n_children == 1) - y += remaining / 2; - else - { /* justified */ - _fixed_point_divide_and_decompose_integer - (remaining, n_children - 1, &global_pad, &pad_inc); - global_pad += priv->pad.v; - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - int child_w, child_h, max_h, min_h, max_w, new_w, new_h, off_x, off_y; - int padding_l, padding_r, padding_t, padding_b; - double align_x, align_y; - - evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); - evas_object_size_hint_min_get(opt->obj, NULL, &min_h); - - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - new_w = child_w; - new_h = child_h; - if (new_w > top_w) top_w = new_w; - - _layout_set_offset_and_expand_dimension_space_max_bounded - (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); - - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, - padding_t, padding_b); - - if ((new_w != child_w) || (new_h != child_h)) - evas_object_resize(opt->obj, new_w, new_h); - evas_object_move(opt->obj, x + off_x, y + off_y); - - y += cell_sz + global_pad; - sub_pixel += pad_inc; - if (sub_pixel >= 1 << 16) - { - y++; - sub_pixel -= 1 << 16; - } - } - - evas_object_size_hint_min_set(o, top_w, y); -} - -static void -_evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *priv, int box_w, int *row_count, int *row_max_h, int *row_break, int *row_width, int *off_y_ret, int *max_h_ret) -{ - int i, remain_w = box_w, start_i = 0; - int off_y = 0, max_h = 0, n_rows = 0; - Eina_List *l; - - for (i = 0, l = priv->children; l; i++, l = l->next) - { - Evas_Object_Box_Option *opt = l->data; - int padding_l, padding_r, padding_t, padding_b; - int child_w, child_h, off_x = 0; - - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - - _sizing_eval(opt->obj); - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - child_w += padding_l + padding_r + priv->pad.h; - child_h += padding_t + padding_b; - - remain_w -= child_w; - if (remain_w + priv->pad.h >= 0) - { /* continue "line" */ - if (child_h > max_h) - max_h = child_h; - - off_x += child_w; - row_width[n_rows] += child_w; - } - else - { /* break line */ - if (i == start_i) - { /* obj goes to actual line */ - max_h = child_h; - row_width[n_rows] = child_w; - } - else - { /* obj goes to next line */ - row_max_h[n_rows] = max_h; - row_break[n_rows] = i - 1; - n_rows++; - - off_x = child_w; - off_y += max_h; - max_h = child_h; - - row_width[n_rows] = child_w; - start_i = i; - - remain_w = box_w - off_x; - } - } - } - - row_break[n_rows] = i - 1; - row_max_h[n_rows] = max_h; - - *row_count = n_rows; - *off_y_ret = off_y; - *max_h_ret = max_h; -} - -EAPI void -evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int n_children; - int r, row_count = 0; - int min_w = 0, min_h = 0; - int max_h, inc_y; - int remain_y, i; - int x, y, w, h; - Eina_List *l; - int *row_max_h; - int *row_break; - int *row_width; - int offset_y; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - /* *per row* arrays */ - row_max_h = (int *)alloca(sizeof(int) * n_children); - if (!row_max_h) - return; - row_break = (int *)alloca(sizeof(int) * n_children); - if (!row_break) - return; - row_width = (int *)alloca(sizeof(int) * n_children); - if (!row_width) - return; - - memset(row_width, 0, sizeof(row_width)); - - 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, &offset_y, &max_h); - - inc_y = 0; - remain_y = h - (offset_y + max_h); - - if (remain_y > 0) - { - if (priv->align.v >= 0.0) - inc_y = priv->align.v * remain_y; - else if (row_count == 0) - y += remain_y / 2; - else /* y-justified */ - inc_y = remain_y / row_count; - } - - inc_y += priv->pad.v; - - for (i = 0, r = 0, l = priv->children; r <= row_count; r++) - { - int row_justify = 0, just_inc = 0, sub_pixel = 0; - int row_size, remain_x; - - row_size = row_break[r] - i; - remain_x = (w - row_width[r]); - - if (priv->align.h < 0.0) - { - if (row_size == 0) - x += remain_x / 2; - else - _fixed_point_divide_and_decompose_integer - (remain_x, row_size, &row_justify, &just_inc); - } - - row_justify += priv->pad.h; - - for (; i <= row_break[r]; i++, l = l->next) - { - Evas_Object_Box_Option *opt = l->data; - int off_x, off_y, y_remain; - int padding_l, padding_r; - int child_w, child_h; - double align_y; - - evas_object_size_hint_align_get(opt->obj, NULL, &align_y); - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, NULL, NULL); - - evas_object_geometry_get - (opt->obj, NULL, NULL, &child_w, &child_h); - - y_remain = row_max_h[r] - child_h; - - off_x = padding_l; - if (priv->align.h >= 0.0) - off_x += remain_x * priv->align.h; - off_y = y_remain * align_y; - - evas_object_move(opt->obj, x + off_x, y + off_y); - - x += child_w + padding_l + padding_r + row_justify; - - sub_pixel += just_inc; - if (sub_pixel >= 1 << 16) - { - x++; - sub_pixel -= 1 << 16; - } - } - - evas_object_geometry_get(o, &x, NULL, NULL, NULL); - if (min_w < row_width[r]) - min_w = row_width[r]; - min_h += row_max_h[r]; - y += row_max_h[r] + inc_y; - } - - evas_object_size_hint_min_set(o, min_w, min_h); -} - -static void -_evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *priv, int box_h, int *col_count, int *col_max_w, int *col_break, int *col_height, int *off_x_ret, int *max_w_ret) -{ - int i, remain_h = box_h, start_i = 0; - int off_x = 0, max_w = 0, n_cols = 0; - Eina_List *l; - - for (i = 0, l = priv->children; l; i++, l = l->next) - { - Evas_Object_Box_Option *opt = l->data; - int padding_l, padding_r, padding_t, padding_b; - int child_w, child_h, off_y = 0; - - evas_object_size_hint_padding_get - (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); - - _sizing_eval(opt->obj); - evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); - - child_w += padding_l + padding_r; - child_h += padding_t + padding_b + priv->pad.v; - - remain_h -= child_h; - if (remain_h + priv->pad.v >= 0) - { /* continue "col" */ - if (child_w > max_w) - max_w = child_w; - - off_y += child_h; - col_height[n_cols] += child_h; - } - else - { - /* break col */ - if (i == start_i) - { /* obj goes to actual col */ - max_w = child_w; - col_height[n_cols] = child_h; - } - else - { /* obj goes to next col */ - col_max_w[n_cols] = max_w; - col_break[n_cols] = i - 1; - n_cols++; - - off_x += max_w; - off_y = child_h; - max_w = child_w; - - col_height[n_cols] = child_h; - start_i = i; - - remain_h = box_h - off_y; - } - } - } - - col_break[n_cols] = i - 1; - col_max_w[n_cols] = max_w; - - *col_count = n_cols; - *off_x_ret = off_x; - *max_w_ret = max_w; -} - -EAPI void -evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - int n_children; - int c, col_count; - int min_w = 0, min_h = 0; - int max_w, inc_x; - int remain_x, i; - int x, y, w, h; - Eina_List *l; - int *col_max_w; - int *col_break; - int *col_height; - int offset_x; - - n_children = eina_list_count(priv->children); - if (!n_children) - return; - - /* *per col* arrays */ - col_max_w = (int *)alloca(sizeof(int) * n_children); - if (!col_max_w) - return; - col_break = (int *)alloca(sizeof(int) * n_children); - if (!col_break) - return; - col_height = (int *)alloca(sizeof(int) * n_children); - if (!col_height) - return; - - memset(col_height, 0, sizeof(col_height)); - - 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, &offset_x, &max_w); - - inc_x = 0; - remain_x = w - (offset_x + max_w); - - if (remain_x > 0) - { - if (priv->align.h >= 0) - inc_x = priv->align.h * remain_x; - else if (col_count == 0) - x += remain_x / 2; - else /* x-justified */ - inc_x = remain_x / col_count; - } - - inc_x += priv->pad.h; - - for (i = 0, c = 0, l = priv->children; c <= col_count; c++) - { - int col_justify = 0, just_inc = 0, sub_pixel = 0; - int col_size, remain_y; - - col_size = col_break[c] - i; - remain_y = (h - col_height[c]); - - if (priv->align.v < 0.0) - { - if (col_size == 0) - y += remain_y / 2; - else - _fixed_point_divide_and_decompose_integer - (remain_y, col_size, &col_justify, &just_inc); - } - - col_justify += priv->pad.v; - - for (; i <= col_break[c]; i++, l = l->next) - { - Evas_Object_Box_Option *opt = l->data; - int off_x, off_y, x_remain; - int padding_t, padding_b; - int child_w, child_h; - double align_x; - - evas_object_size_hint_align_get(opt->obj, &align_x, NULL); - evas_object_size_hint_padding_get - (opt->obj, NULL, NULL, &padding_t, &padding_b); - - evas_object_geometry_get - (opt->obj, NULL, NULL, &child_w, &child_h); - - x_remain = col_max_w[c] - child_w; - - off_x = x_remain * align_x; - off_y = padding_t; - if (priv->align.v >= 0.0) - off_y += remain_y * priv->align.v; - - evas_object_move(opt->obj, x + off_x, y + off_y); - - y += child_h + padding_t + padding_b + col_justify; - - sub_pixel += just_inc; - if (sub_pixel >= 1 << 16) - { - y++; - sub_pixel -= 1 << 16; - } - } - - evas_object_geometry_get(o, NULL, &y, NULL, NULL); - min_w += col_max_w[c]; - if (min_h < col_height[c]) - min_h = col_height[c]; - x += col_max_w[c] + inc_x; - } - - evas_object_size_hint_min_set(o, min_w, min_h); -} - -EAPI void -evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) -{ - Eina_List *l; - Evas_Coord ox, oy, ow, oh; - Evas_Coord top_w = 0, top_h = 0; - Evas_Object_Box_Option *opt; - Evas_Object *old_child = NULL; - - evas_object_geometry_get(o, &ox, &oy, &ow, &oh); - - EINA_LIST_FOREACH(priv->children, l, opt) - { - Evas_Object *child = opt->obj; - Evas_Coord max_w, max_h, min_w, min_h, pad_l, pad_r, pad_t, pad_b, - child_w, child_h, new_w, new_h, off_x, off_y; - double align_x, align_y; - - evas_object_size_hint_align_get(child, &align_x, &align_y); - evas_object_size_hint_padding_get - (child, &pad_l, &pad_r, &pad_t, &pad_b); - evas_object_size_hint_max_get(child, &max_w, &max_h); - evas_object_size_hint_min_get(child, &min_w, &min_h); - - _sizing_eval(opt->obj); - evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h); - new_w = child_w; - new_h = child_h; - if (new_w > top_w) top_w = new_w; - if (new_h > top_h) top_h = new_h; - - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_w, &new_w, min_w, max_w, ow, &off_x, align_x, pad_l, pad_r); - _layout_set_offset_and_change_dimension_min_max_cell_bounded - (child_h, &new_h, min_h, max_h, oh, &off_y, align_y, pad_t, pad_b); - - if ((new_w != child_w) || (new_h != child_h)) - evas_object_resize(child, new_w, new_h); - evas_object_move(child, ox + off_x, oy + off_y); - - if (old_child) - evas_object_stack_above(child, old_child); - old_child = child; - } - - evas_object_size_hint_min_set(o, top_w, top_h); -} - -EAPI void -evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical) -{ - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); - if (priv->align.h == horizontal && priv->align.v == vertical) - return; - priv->align.h = horizontal; - priv->align.v = vertical; - evas_object_smart_changed(o); -} - -EAPI void -evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical) -{ - EVAS_OBJECT_BOX_DATA_GET(o, priv); - if (priv) - { - if (horizontal) *horizontal = priv->align.h; - if (vertical) *vertical = priv->align.v; - } - else - { - if (horizontal) *horizontal = 0.5; - if (vertical) *vertical = 0.5; - } -} - -EAPI void -evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) -{ - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); - if (priv->pad.h == horizontal && priv->pad.v == vertical) - return; - priv->pad.h = horizontal; - priv->pad.v = vertical; - evas_object_smart_changed(o); -} - -EAPI void -evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) -{ - EVAS_OBJECT_BOX_DATA_GET(o, priv); - if (priv) - { - if (horizontal) *horizontal = priv->pad.h; - if (vertical) *vertical = priv->pad.v; - } - else - { - if (horizontal) *horizontal = 0; - if (vertical) *vertical = 0; - } -} - -EAPI Evas_Object_Box_Option * -evas_object_box_append(Evas_Object *o, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - if (!child) - return NULL; - - api = priv->api; - if ((!api) || (!api->append)) - return NULL; - - opt = api->append(o, priv, child); - - if (opt) - { - evas_object_smart_member_add(child, o); - evas_object_smart_changed(o); - return _evas_object_box_option_callbacks_register(o, priv, opt); - } - - return NULL; -} - -EAPI Evas_Object_Box_Option * -evas_object_box_prepend(Evas_Object *o, Evas_Object *child) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - if (!child) - return NULL; - - api = priv->api; - if ((!api) || (!api->prepend)) - return NULL; - - opt = api->prepend(o, priv, child); - - if (opt) - { - evas_object_smart_member_add(child, o); - evas_object_smart_changed(o); - return _evas_object_box_option_callbacks_register(o, priv, opt); - } - - return NULL; -} - -EAPI Evas_Object_Box_Option * -evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - if (!child) - return NULL; - - api = priv->api; - if ((!api) || (!api->insert_before)) - return NULL; - - opt = api->insert_before(o, priv, child, reference); - - if (opt) - { - evas_object_smart_member_add(child, o); - evas_object_smart_changed(o); - return _evas_object_box_option_callbacks_register(o, priv, opt); - } - - return NULL; -} - -EAPI Evas_Object_Box_Option * -evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - if (!child) - return NULL; - - api = priv->api; - if ((!api) || (!api->insert_after)) - return NULL; - - opt = api->insert_after(o, priv, child, reference); - - if (opt) - { - evas_object_smart_member_add(child, o); - evas_object_smart_changed(o); - return _evas_object_box_option_callbacks_register(o, priv, opt); - } - - return NULL; -} - -EAPI Evas_Object_Box_Option * -evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos) -{ - Evas_Object_Box_Option *opt; - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - if (!child) - return NULL; - - api = priv->api; - if ((!api) || (!api->insert_at)) - return NULL; - - opt = api->insert_at(o, priv, child, pos); - - if (opt) - { - evas_object_smart_member_add(child, o); - evas_object_smart_changed(o); - return _evas_object_box_option_callbacks_register(o, priv, opt); - } - - return NULL; -} - -EAPI Eina_Bool -evas_object_box_remove(Evas_Object *o, Evas_Object *child) -{ - const Evas_Object_Box_Api *api; - Evas_Object *obj; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - if (!child) return EINA_FALSE; - - api = priv->api; - if ((!api) || (!api->remove)) - return 0; - - obj = api->remove(o, priv, child); - - if (obj) - { - _evas_object_box_child_callbacks_unregister(obj); - evas_object_smart_member_del(obj); - evas_object_smart_changed(o); - return EINA_TRUE; - } - - return EINA_FALSE; -} - -EAPI Eina_Bool -evas_object_box_remove_at(Evas_Object *o, unsigned int pos) -{ - const Evas_Object_Box_Api *api; - Evas_Object *obj; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - api = priv->api; - if ((!api) || (!api->remove_at)) return EINA_FALSE; - - obj = api->remove_at(o, priv, pos); - - if (obj) - { - _evas_object_box_child_callbacks_unregister(obj); - evas_object_smart_member_del(obj); - evas_object_smart_changed(o); - return EINA_TRUE; - } - - return EINA_FALSE; -} - -EAPI Eina_Bool -evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear) -{ - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - - api = priv->api; - if ((!api) || (!api->remove)) return EINA_FALSE; - - evas_object_smart_changed(o); - - while (priv->children) - { - Evas_Object_Box_Option *opt = priv->children->data; - Evas_Object *obj; - - obj = api->remove(o, priv, opt->obj); - if (obj) - { - _evas_object_box_child_callbacks_unregister(obj); - evas_object_smart_member_del(obj); - if (clear) - evas_object_del(obj); - } - else return EINA_FALSE; - } - - return EINA_TRUE; -} - -EAPI Eina_Iterator * -evas_object_box_iterator_new(const Evas_Object *o) -{ - Evas_Object_Box_Iterator *it; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - if (!priv->children) return NULL; - - it = calloc(1, sizeof(Evas_Object_Box_Iterator)); - if (!it) return NULL; - - EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); - - it->real_iterator = eina_list_iterator_new(priv->children); - it->box = o; - - it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_box_iterator_next); - it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_box_iterator_get_container); - it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_box_iterator_free); - - return &it->iterator; -} - -EAPI Eina_Accessor * -evas_object_box_accessor_new(const Evas_Object *o) -{ - Evas_Object_Box_Accessor *it; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - if (!priv->children) return NULL; - - it = calloc(1, sizeof(Evas_Object_Box_Accessor)); - if (!it) return NULL; - - EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); - - it->real_accessor = eina_list_accessor_new(priv->children); - it->box = o; - - it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_box_accessor_get_at); - it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_box_accessor_get_container); - it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_box_accessor_free); - - return &it->accessor; -} - -EAPI Eina_List * -evas_object_box_children_get(const Evas_Object *o) -{ - Eina_List *new_list = NULL, *l; - Evas_Object_Box_Option *opt; - - EVAS_OBJECT_BOX_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 const char * -evas_object_box_option_property_name_get(Evas_Object *o, int property) -{ - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - if (property < 0) - return NULL; - - api = priv->api; - if ((!api) || (!api->property_name_get)) - return NULL; - - return api->property_name_get(o, property); -} - -EAPI int -evas_object_box_option_property_id_get(Evas_Object *o, const char *name) -{ - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, -1); - - if (!name) - return -1; - - api = priv->api; - if ((!api) || (!api->property_id_get)) - return -1; - - return api->property_id_get(o, name); -} - -EAPI Eina_Bool -evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) -{ - Eina_Bool ret; - va_list args; - - va_start(args, property); - ret = evas_object_box_option_property_vset(o, opt, property, args); - va_end(args); - - return ret; -} - - -EAPI Eina_Bool -evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) -{ - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - - if (!opt) return EINA_FALSE; - - api = priv->api; - if ((!api) || (!api->property_set)) - return EINA_FALSE; - - if (!api->property_set(o, opt, property, args)) - return EINA_FALSE; - - evas_object_smart_changed(o); - return EINA_TRUE; -} - -EAPI Eina_Bool -evas_object_box_option_property_get(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) -{ - Eina_Bool ret; - va_list args; - - va_start(args, property); - ret = evas_object_box_option_property_vget(o, opt, property, args); - va_end(args); - - return ret; -} - -EAPI Eina_Bool -evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) -{ - const Evas_Object_Box_Api *api; - - EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); - - if (!opt) return EINA_FALSE; - - api = priv->api; - if ((!api) || (!api->property_get)) - return EINA_FALSE; - - return api->property_get(o, opt, property, args); -} diff --git a/libraries/evas/src/lib/canvas/evas_object_grid.c b/libraries/evas/src/lib/canvas/evas_object_grid.c deleted file mode 100644 index db0f43d..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_grid.c +++ /dev/null @@ -1,465 +0,0 @@ -#include "evas_common.h" -#include - -typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; -typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; -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[] = "|EvGd"; - -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) -{ - if (w) *w = 0; - if (h) *h = 0; - EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); - if (w) *w = priv->size.w; - if (h) *h = priv->size.h; -} - -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; - - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - 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); - } -} diff --git a/libraries/evas/src/lib/canvas/evas_object_image.c b/libraries/evas/src/lib/canvas/evas_object_image.c deleted file mode 100644 index 4ebea08..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_image.c +++ /dev/null @@ -1,3957 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Evas.h is correctly defined */ -#endif - -#include -#include -#include -#ifdef HAVE_SYS_MMAN_H -# include -#endif -#include - -#include "evas_common.h" -#include "evas_private.h" -#include "../engines/common/evas_convert_color.h" -#include "../engines/common/evas_convert_colorspace.h" -#include "../engines/common/evas_convert_yuv.h" - -#define VERBOSE_PROXY_ERROR 1 - -/* private magic number for image objects */ -static const char o_type[] = "image"; - -/* private struct for rectangle object internal data */ -typedef struct _Evas_Object_Image Evas_Object_Image; - -struct _Evas_Object_Image -{ - DATA32 magic; - - struct { - int spread; - Evas_Coord_Rectangle fill; - struct { - short w, h, stride; - } image; - struct { - short l, r, t, b; - unsigned char fill; - double scale; - } border; - - Evas_Object *source; - Evas_Map *defmap; - const char *file; - const char *key; - int frame; - Evas_Colorspace cspace; - - unsigned char smooth_scale : 1; - unsigned char has_alpha :1; - unsigned char opaque :1; - unsigned char opaque_valid :1; - } cur, prev; - - int pixels_checked_out; - int load_error; - Eina_List *pixel_updates; - - struct { - unsigned char scale_down_by; - double dpi; - short w, h; - struct { - short x, y, w, h; - } region; - Eina_Bool orientation : 1; - } load_opts; - - struct { - Evas_Object_Image_Pixels_Get_Cb get_pixels; - void *get_pixels_data; - } func; - - Evas_Video_Surface video; - - const char *tmpf; - int tmpf_fd; - - Evas_Image_Scale_Hint scale_hint; - Evas_Image_Content_Hint content_hint; - - void *engine_data; - - unsigned char changed : 1; - unsigned char dirty_pixels : 1; - unsigned char filled : 1; - unsigned char proxyrendering : 1; - unsigned char preloading : 1; - unsigned char video_rendering : 1; - unsigned char video_surface : 1; - unsigned char video_visible : 1; - unsigned char created : 1; -}; - -/* private methods for image objects */ -static void evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty); -static void evas_object_image_load(Evas_Object *obj); -static Evas_Coord evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); -static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); - -static void evas_object_image_init(Evas_Object *obj); -static void *evas_object_image_new(void); -static void evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_image_free(Evas_Object *obj); -static void evas_object_image_render_pre(Evas_Object *obj); -static void evas_object_image_render_post(Evas_Object *obj); - -static unsigned int evas_object_image_id_get(Evas_Object *obj); -static unsigned int evas_object_image_visual_id_get(Evas_Object *obj); -static void *evas_object_image_engine_data_get(Evas_Object *obj); - -static int evas_object_image_is_opaque(Evas_Object *obj); -static int evas_object_image_was_opaque(Evas_Object *obj); -static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -static int evas_object_image_has_opaque_rect(Evas_Object *obj); -static int evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); -static int evas_object_image_can_map(Evas_Object *obj); - -static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace); -static void evas_object_image_filled_resize_listener(void *data, Evas *e, Evas_Object *obj, void *einfo); - -static void _proxy_unset(Evas_Object *proxy); -static void _proxy_set(Evas_Object *proxy, Evas_Object *src); -static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y); - -static void _cleanup_tmpf(Evas_Object *obj); - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_image_free, - evas_object_image_render, - evas_object_image_render_pre, - evas_object_image_render_post, - evas_object_image_id_get, - evas_object_image_visual_id_get, - evas_object_image_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_image_is_opaque, - evas_object_image_was_opaque, - evas_object_image_is_inside, - NULL, - NULL, - NULL, - evas_object_image_has_opaque_rect, - evas_object_image_get_opaque_rect, - evas_object_image_can_map -}; - -EVAS_MEMPOOL(_mp_obj); - -static void -_evas_object_image_cleanup(Evas_Object *obj, Evas_Object_Image *o) -{ - if ((o->preloading) && (o->engine_data)) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - if (o->tmpf) _cleanup_tmpf(obj); - if (o->cur.source) _proxy_unset(obj); -} - -EAPI Evas_Object * -evas_object_image_add(Evas *e) -{ - Evas_Object *obj; - Evas_Object_Image *o; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_image_init(obj); - evas_object_inject(obj, e); - o = (Evas_Object_Image *)(obj->object_data); - o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, - o->engine_data); - return obj; -} - -EAPI Evas_Object * -evas_object_image_filled_add(Evas *e) -{ - Evas_Object *obj; - obj = evas_object_image_add(e); - evas_object_image_filled_set(obj, 1); - return obj; -} - -static void -_cleanup_tmpf(Evas_Object *obj) -{ -#ifdef HAVE_SYS_MMAN_H - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (!o->tmpf) return; -#ifdef __linux__ -#else - unlink(o->tmpf); -#endif - if (o->tmpf_fd >= 0) close(o->tmpf_fd); - eina_stringshare_del(o->tmpf); - o->tmpf_fd = -1; - o->tmpf = NULL; -#else - (void) obj; -#endif -} - -static void -_create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) -{ -#ifdef HAVE_SYS_MMAN_H - Evas_Object_Image *o; - char buf[4096]; - void *dst; - int fd = -1; - - o = (Evas_Object_Image *)(obj->object_data); -#ifdef __linux__ - snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX", - (int)getpid(), data, (int)size); - fd = mkstemp(buf); -#endif - if (fd < 0) - { - snprintf(buf, sizeof(buf), "/tmp/.evas-tmpf-%i-%p-%i-XXXXXX", - (int)getpid(), data, (int)size); - fd = mkstemp(buf); - } - if (fd < 0) return; - if (ftruncate(fd, size) < 0) - { - unlink(buf); - close(fd); - return; - } - unlink(buf); - - eina_mmap_safety_enabled_set(EINA_TRUE); - - dst = mmap(NULL, size, - PROT_READ | PROT_WRITE, - MAP_SHARED, - fd, 0); - if (dst == MAP_FAILED) - { - close(fd); - return; - } - o->tmpf_fd = fd; -#ifdef __linux__ - snprintf(buf, sizeof(buf), "/proc/%li/fd/%i", (long)getpid(), fd); -#endif - o->tmpf = eina_stringshare_add(buf); - memcpy(dst, data, size); - munmap(dst, size); -#else - (void) obj; - (void) data; - (void) size; - (void) format; -#endif -} - -EAPI void -evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) -{ - 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(); - _cleanup_tmpf(obj); - evas_object_image_file_set(obj, NULL, NULL); - // invalidate the cache effectively - evas_object_image_alpha_set(obj, !o->cur.has_alpha); - evas_object_image_alpha_set(obj, !o->cur.has_alpha); - - if ((size < 1) || (!data)) return; - - _create_tmpf(obj, data, size, format); - evas_object_image_file_set(obj, o->tmpf, key); - if (!o->engine_data) - { - ERR("unable to load '%s' from memory", o->tmpf); - _cleanup_tmpf(obj); - return; - } -} - -EAPI void -evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key) -{ - Evas_Object_Image *o; - Evas_Image_Load_Opts lo; - - 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(); - if ((o->tmpf) && (file != o->tmpf)) _cleanup_tmpf(obj); - if ((o->cur.file) && (file) && (!strcmp(o->cur.file, file))) - { - if ((!o->cur.key) && (!key)) - return; - if ((o->cur.key) && (key) && (!strcmp(o->cur.key, key))) - return; - } -/* - * WTF? why cancel a null image preload? this is just silly (tm) - if (!o->engine_data) - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - */ - if (o->cur.source) _proxy_unset(obj); - if (o->cur.file) eina_stringshare_del(o->cur.file); - if (o->cur.key) eina_stringshare_del(o->cur.key); - if (file) o->cur.file = eina_stringshare_add(file); - else o->cur.file = NULL; - if (key) o->cur.key = eina_stringshare_add(key); - else o->cur.key = NULL; - o->prev.file = NULL; - o->prev.key = NULL; - if (o->engine_data) - { - if (o->preloading) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, - o->engine_data); - } - o->load_error = EVAS_LOAD_ERROR_NONE; - lo.scale_down_by = o->load_opts.scale_down_by; - lo.dpi = o->load_opts.dpi; - lo.w = o->load_opts.w; - lo.h = o->load_opts.h; - lo.region.x = o->load_opts.region.x; - 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, - &o->load_error, - &lo); - if (o->engine_data) - { - int w, h; - int stride; - - obj->layer->evas->engine.func->image_size_get(obj->layer->evas->engine.data.output, - o->engine_data, &w, &h); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = w * 4; - o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get(obj->layer->evas->engine.data.output, - o->engine_data); - o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, - o->engine_data); - o->cur.image.w = w; - o->cur.image.h = h; - o->cur.image.stride = stride; - } - else - { - if (o->load_error == EVAS_LOAD_ERROR_NONE) - o->load_error = EVAS_LOAD_ERROR_GENERIC; - o->cur.has_alpha = 1; - o->cur.cspace = EVAS_COLORSPACE_ARGB8888; - o->cur.image.w = 0; - o->cur.image.h = 0; - o->cur.image.stride = 0; - } - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (file) *file = NULL; - if (key) *key = NULL; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - if (file) *file = NULL; - if (key) *key = NULL; - return; - MAGIC_CHECK_END(); - if (file) *file = o->cur.file; - if (key) *key = o->cur.key; -} - -EAPI Eina_Bool -evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - o = obj->object_data; - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EINA_FALSE; - MAGIC_CHECK_END(); - - if (src == obj) return EINA_FALSE; - if (o->cur.source == src) return EINA_TRUE; - - _evas_object_image_cleanup(obj, o); - /* Kill the image if any */ - if (o->cur.file || o->cur.key) - evas_object_image_file_set(obj, NULL, NULL); - - if (src) - { - _proxy_set(obj, src); - } - - return EINA_TRUE; -} - - -EAPI Evas_Object * -evas_object_image_source_get(Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = obj->object_data; - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return NULL; - MAGIC_CHECK_END(); - - return o->cur.source; -} - -EAPI Eina_Bool -evas_object_image_source_unset(Evas_Object *obj) -{ - return evas_object_image_source_set(obj, NULL); -} - -EAPI void -evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) -{ - 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(); - if (l < 0) l = 0; - if (r < 0) r = 0; - if (t < 0) t = 0; - if (b < 0) b = 0; - if ((o->cur.border.l == l) && - (o->cur.border.r == r) && - (o->cur.border.t == t) && - (o->cur.border.b == b)) return; - o->cur.border.l = l; - o->cur.border.r = r; - o->cur.border.t = t; - o->cur.border.b = b; - o->cur.opaque_valid = 0; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (l) *l = 0; - if (r) *r = 0; - if (t) *t = 0; - if (b) *b = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - if (l) *l = 0; - if (r) *r = 0; - if (t) *t = 0; - if (b) *b = 0; - return; - MAGIC_CHECK_END(); - if (l) *l = o->cur.border.l; - if (r) *r = o->cur.border.r; - if (t) *t = o->cur.border.t; - if (b) *b = o->cur.border.b; -} - -EAPI void -evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill) -{ - 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(); - if (fill == o->cur.border.fill) return; - o->cur.border.fill = fill; - o->changed = 1; - evas_object_change(obj); -} - -EAPI Evas_Border_Fill_Mode -evas_object_image_border_center_fill_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->cur.border.fill; -} - -EAPI void -evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting) -{ - 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(); - - setting = !!setting; - if (o->filled == setting) return; - - o->filled = setting; - if (!o->filled) - evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener); - else - { - Evas_Coord w, h; - - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - evas_object_image_fill_set(obj, 0, 0, w, h); - - evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener, NULL); - } -} - -EAPI Eina_Bool -evas_object_image_filled_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - - return o->filled; -} - -EAPI void -evas_object_image_border_scale_set(Evas_Object *obj, double scale) -{ - 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(); - if (scale == o->cur.border.scale) return; - o->cur.border.scale = scale; - o->changed = 1; - evas_object_change(obj); -} - -EAPI double -evas_object_image_border_scale_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 1.0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 1.0; - MAGIC_CHECK_END(); - return o->cur.border.scale; -} - -EAPI void -evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) -{ - Evas_Object_Image *o; - - if (w < 0) w = -w; - if (h < 0) h = -h; - if (w == 0) return; - if (h == 0) return; - 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(); - if ((o->cur.fill.x == x) && - (o->cur.fill.y == y) && - (o->cur.fill.w == w) && - (o->cur.fill.h == h)) return; - o->cur.fill.x = x; - o->cur.fill.y = y; - o->cur.fill.w = w; - o->cur.fill.h = h; - o->cur.opaque_valid = 0; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - if (x) *x = 0; - if (y) *y = 0; - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - if (x) *x = o->cur.fill.x; - if (y) *y = o->cur.fill.y; - if (w) *w = o->cur.fill.w; - if (h) *h = o->cur.fill.h; -} - - -EAPI void -evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread) -{ - 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(); - if (spread == (Evas_Fill_Spread)o->cur.spread) return; - o->cur.spread = spread; - o->changed = 1; - evas_object_change(obj); -} - -EAPI Evas_Fill_Spread -evas_object_image_fill_spread_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_TEXTURE_REPEAT; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EVAS_TEXTURE_REPEAT; - MAGIC_CHECK_END(); - return (Evas_Fill_Spread)o->cur.spread; -} - -EAPI void -evas_object_image_size_set(Evas_Object *obj, int w, int h) -{ - Evas_Object_Image *o; - int stride = 0; - - 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(); - _evas_object_image_cleanup(obj, o); - if (w < 1) w = 1; - if (h < 1) h = 1; - if (w > 32768) return; - if (h > 32768) return; - if ((w == o->cur.image.w) && - (h == o->cur.image.h)) return; - o->cur.image.w = w; - o->cur.image.h = h; - if (o->engine_data) - o->engine_data = obj->layer->evas->engine.func->image_size_set(obj->layer->evas->engine.data.output, - o->engine_data, - w, h); - else - o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data - (obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha, - o->cur.cspace); - - if (o->engine_data) - { - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = w * 4; - } - else - stride = w * 4; - o->cur.image.stride = stride; - -/* FIXME - in engine call above - if (o->engine_data) - o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); -*/ - EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_image_size_get(const Evas_Object *obj, int *w, int *h) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - if (w) *w = 0; - if (h) *h = 0; - return; - MAGIC_CHECK_END(); - if (w) *w = o->cur.image.w; - if (h) *h = o->cur.image.h; -} - -EAPI int -evas_object_image_stride_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->cur.image.stride; -} - -EAPI Evas_Load_Error -evas_object_image_load_error_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->load_error; -} - -EAPI void * -evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) -{ - Evas_Object_Image *o; - DATA32 *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return NULL; - MAGIC_CHECK_END(); - if ((o->preloading) && (o->engine_data)) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - if (!o->engine_data) return NULL; - if (o->video_surface) - o->video.update_pixels(o->video.data, obj, &o->video); - if (o->cur.cspace == to_cspace) return NULL; - data = NULL; - o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, - o->engine_data, - 0, - &data, - &o->load_error); - return evas_object_image_data_convert_internal(o, data, to_cspace); -} - -EAPI void -evas_object_image_data_set(Evas_Object *obj, void *data) -{ - Evas_Object_Image *o; - void *p_data; - - 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(); - _evas_object_image_cleanup(obj, o); -#ifdef EVAS_FRAME_QUEUING - if (o->engine_data) - evas_common_pipe_op_image_flush(o->engine_data); -#endif - p_data = o->engine_data; - if (data) - { - if (o->engine_data) - o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, - o->engine_data, - data); - else - o->engine_data = obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output, - o->cur.image.w, - o->cur.image.h, - data, - o->cur.has_alpha, - o->cur.cspace); - if (o->engine_data) - { - int stride = 0; - - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } - } - else - { - if (o->engine_data) - obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, - o->engine_data); - o->load_error = EVAS_LOAD_ERROR_NONE; - o->cur.image.w = 0; - o->cur.image.h = 0; - o->cur.image.stride = 0; - o->engine_data = NULL; - } -/* FIXME - in engine call above - if (o->engine_data) - o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); -*/ - if (o->pixels_checked_out > 0) o->pixels_checked_out--; - if (p_data != o->engine_data) - { - EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); - o->pixels_checked_out = 0; - } - o->changed = 1; - evas_object_change(obj); -} - -EAPI void * -evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing) -{ - Evas_Object_Image *o; - DATA32 *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return NULL; - MAGIC_CHECK_END(); - if (!o->engine_data) return NULL; -#ifdef EVAS_FRAME_QUEUING - evas_common_pipe_op_image_flush(o->engine_data); -#endif - - data = NULL; - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, - o->engine_data, - for_writing, - &data, - &o->load_error); - - /* if we fail to get engine_data, we have to return NULL */ - if (!o->engine_data) return NULL; - - if (o->engine_data) - { - int stride = 0; - - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } - o->pixels_checked_out++; - if (for_writing) - { - EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); - } - - return data; -} - -EAPI void -evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) -{ - 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(); - if (!o->engine_data) - { - o->preloading = 1; - evas_object_inform_call_image_preloaded(obj); - return; - } - // FIXME: if already busy preloading, then dont request again until - // preload done - if (cancel) - { - if (o->preloading) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - } - else - { - if (!o->preloading) - { - o->preloading = 1; - obj->layer->evas->engine.func->image_data_preload_request(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - } -} - -EAPI void -evas_object_image_data_copy_set(Evas_Object *obj, void *data) -{ - Evas_Object_Image *o; - - if (!data) return; - 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(); - _evas_object_image_cleanup(obj, o); - if ((o->cur.image.w <= 0) || - (o->cur.image.h <= 0)) return; - if (o->engine_data) - obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, - o->engine_data); - o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output, - o->cur.image.w, - o->cur.image.h, - data, - o->cur.has_alpha, - o->cur.cspace); - if (o->engine_data) - { - int stride = 0; - - o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } - o->pixels_checked_out = 0; - EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); -} - -EAPI void -evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h) -{ - Evas_Object_Image *o; - Eina_Rectangle *r; - - 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(); - RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.image.w, o->cur.image.h); - if ((w <= 0) || (h <= 0)) return; - NEW_RECT(r, x, y, w, h); - if (r) o->pixel_updates = eina_list_append(o->pixel_updates, r); - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha) -{ - 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(); - if ((o->preloading) && (o->engine_data)) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - if (((has_alpha) && (o->cur.has_alpha)) || - ((!has_alpha) && (!o->cur.has_alpha))) - return; - o->cur.has_alpha = has_alpha; - if (o->engine_data) - { - int stride = 0; - -#ifdef EVAS_FRAME_QUEUING - evas_common_pipe_op_image_flush(o->engine_data); -#endif - o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } - evas_object_image_data_update_add(obj, 0, 0, o->cur.image.w, o->cur.image.h); - EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); -} - - -EAPI Eina_Bool -evas_object_image_alpha_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->cur.has_alpha; -} - -EAPI void -evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale) -{ - 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(); - if (((smooth_scale) && (o->cur.smooth_scale)) || - ((!smooth_scale) && (!o->cur.smooth_scale))) - return; - o->cur.smooth_scale = smooth_scale; - o->changed = 1; - evas_object_change(obj); -} - -EAPI Eina_Bool -evas_object_image_smooth_scale_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->cur.smooth_scale; -} - -EAPI void -evas_object_image_reload(Evas_Object *obj) -{ - 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(); - if ((o->preloading) && (o->engine_data)) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - if ((!o->cur.file) || - (o->pixels_checked_out > 0)) return; - if (o->engine_data) - 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); - evas_object_image_unload(obj, 1); - evas_object_inform_call_image_unloaded(obj); - evas_object_image_load(obj); - o->prev.file = NULL; - o->prev.key = NULL; - o->changed = 1; - evas_object_change(obj); -} - -EAPI Eina_Bool -evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags) -{ - Evas_Object_Image *o; - DATA32 *data = NULL; - int quality = 80, compress = 9, ok = 0; - RGBA_Image *im; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - - if (!o->engine_data) return 0; - o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, - o->engine_data, - 0, - &data, - &o->load_error); - if (flags) - { - char *p, *pp; - char *tflags; - - tflags = alloca(strlen(flags) + 1); - strcpy(tflags, flags); - p = tflags; - while (p) - { - pp = strchr(p, ' '); - if (pp) *pp = 0; - sscanf(p, "quality=%i", &quality); - sscanf(p, "compress=%i", &compress); - if (pp) p = pp + 1; - else break; - } - } - im = (RGBA_Image*) evas_cache_image_data(evas_common_image_cache_get(), - o->cur.image.w, - o->cur.image.h, - data, - o->cur.has_alpha, - EVAS_COLORSPACE_ARGB8888); - if (im) - { - if (o->cur.cspace == EVAS_COLORSPACE_ARGB8888) - im->image.data = data; - else - im->image.data = evas_object_image_data_convert_internal(o, - data, - EVAS_COLORSPACE_ARGB8888); - if (im->image.data) - { - ok = evas_common_save_image_to_file(im, file, key, quality, compress); - - if (o->cur.cspace != EVAS_COLORSPACE_ARGB8888) - free(im->image.data); - } - - evas_cache_image_drop(&im->cache_entry); - } - return ok; -} - -EAPI Eina_Bool -evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - _evas_object_image_cleanup(obj, o); - if ((pixels->w != o->cur.image.w) || (pixels->h != o->cur.image.h)) return 0; - switch (pixels->format) - { -#if 0 - case EVAS_PIXEL_FORMAT_ARGB32: - { - if (o->engine_data) - { - DATA32 *image_pixels = NULL; - - o->engine_data = - obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, - o->engine_data, - 1, - &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) - o->engine_data = - obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, - o->engine_data, - image_pixels); - if (o->engine_data) - o->engine_data = - obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); - o->changed = 1; - evas_object_change(obj); - } - } - break; -#endif -#ifdef BUILD_CONVERT_YUV - case EVAS_PIXEL_FORMAT_YUV420P_601: - { - if (o->engine_data) - { - DATA32 *image_pixels = NULL; - - o->engine_data = - obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, - o->engine_data, - 1, - &image_pixels, - &o->load_error); - if (image_pixels) - evas_common_convert_yuv_420p_601_rgba((DATA8 **) pixels->rows, - (DATA8 *) image_pixels, - o->cur.image.w, - o->cur.image.h); - if (o->engine_data) - o->engine_data = - obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, - o->engine_data, - image_pixels); - if (o->engine_data) - o->engine_data = - obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, - o->engine_data, - o->cur.has_alpha); - o->changed = 1; - evas_object_change(obj); - } - } - break; -#endif - default: - return 0; - break; - } - return 1; -} - -EAPI void -evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) -{ - 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->func.get_pixels = func; - o->func.get_pixels_data = data; -} - -EAPI void -evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty) -{ - 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(); - if (dirty) o->dirty_pixels = 1; - else o->dirty_pixels = 0; - o->changed = 1; - evas_object_change(obj); -} - -EAPI Eina_Bool -evas_object_image_pixels_dirty_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - if (o->dirty_pixels) return 1; - return 0; -} - -EAPI void -evas_object_image_load_dpi_set(Evas_Object *obj, double dpi) -{ - 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(); - if (dpi == o->load_opts.dpi) return; - o->load_opts.dpi = dpi; - if (o->cur.file) - { - evas_object_image_unload(obj, 0); - evas_object_inform_call_image_unloaded(obj); - evas_object_image_load(obj); - o->changed = 1; - evas_object_change(obj); - } -} - -EAPI double -evas_object_image_load_dpi_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0.0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0.0; - MAGIC_CHECK_END(); - return o->load_opts.dpi; -} - -EAPI void -evas_object_image_load_size_set(Evas_Object *obj, int w, int h) -{ - 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(); - if ((o->load_opts.w == w) && (o->load_opts.h == h)) return; - o->load_opts.w = w; - o->load_opts.h = h; - if (o->cur.file) - { - evas_object_image_unload(obj, 0); - evas_object_inform_call_image_unloaded(obj); - evas_object_image_load(obj); - o->changed = 1; - evas_object_change(obj); - } -} - -EAPI void -evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h) -{ - 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(); - if (w) *w = o->load_opts.w; - if (h) *h = o->load_opts.h; -} - -EAPI void -evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down) -{ - 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(); - if (o->load_opts.scale_down_by == scale_down) return; - o->load_opts.scale_down_by = scale_down; - if (o->cur.file) - { - evas_object_image_unload(obj, 0); - evas_object_inform_call_image_unloaded(obj); - evas_object_image_load(obj); - o->changed = 1; - evas_object_change(obj); - } -} - -EAPI int -evas_object_image_load_scale_down_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return 0; - MAGIC_CHECK_END(); - return o->load_opts.scale_down_by; -} - -EAPI void -evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h) -{ - 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(); - if ((o->load_opts.region.x == x) && (o->load_opts.region.y == y) && - (o->load_opts.region.w == w) && (o->load_opts.region.h == h)) return; - o->load_opts.region.x = x; - o->load_opts.region.y = y; - o->load_opts.region.w = w; - o->load_opts.region.h = h; - if (o->cur.file) - { - evas_object_image_unload(obj, 0); - evas_object_inform_call_image_unloaded(obj); - evas_object_image_load(obj); - o->changed = 1; - evas_object_change(obj); - } -} - -EAPI void -evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) -{ - 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(); - if (x) *x = o->load_opts.region.x; - if (y) *y = o->load_opts.region.y; - if (w) *w = o->load_opts.region.w; - if (h) *h = o->load_opts.region.h; -} - -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) -{ - 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(); - - _evas_object_image_cleanup(obj, o); -#ifdef EVAS_FRAME_QUEUING - if ((Evas_Colorspace)o->cur.cspace != cspace) - { - if (o->engine_data) - evas_common_pipe_op_image_flush(o->engine_data); - } -#endif - - o->cur.cspace = cspace; - if (o->engine_data) - obj->layer->evas->engine.func->image_colorspace_set(obj->layer->evas->engine.data.output, - o->engine_data, - cspace); -} - -EAPI Evas_Colorspace -evas_object_image_colorspace_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_COLORSPACE_ARGB8888; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EVAS_COLORSPACE_ARGB8888; - MAGIC_CHECK_END(); - return o->cur.cspace; -} - -EAPI void -evas_object_image_video_surface_set(Evas_Object *obj, Evas_Video_Surface *surf) -{ - 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(); - _evas_object_image_cleanup(obj, o); - if (o->video_surface) - { - o->video_surface = 0; - obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); - } - - if (surf) - { - if (surf->version != EVAS_VIDEO_SURFACE_VERSION) return ; - - if (!surf->update_pixels || - !surf->move || - !surf->resize || - !surf->hide || - !surf->show) - return ; - - o->created = EINA_TRUE; - o->video_surface = 1; - o->video = *surf; - - obj->layer->evas->video_objects = eina_list_append(obj->layer->evas->video_objects, obj); - } - else - { - o->video_surface = 0; - o->video.update_pixels = NULL; - o->video.move = NULL; - o->video.resize = NULL; - o->video.hide = NULL; - o->video.show = NULL; - o->video.data = NULL; - } -} - -EAPI const Evas_Video_Surface * -evas_object_image_video_surface_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return NULL; - MAGIC_CHECK_END(); - if (!o->video_surface) return NULL; - return &o->video; -} - -EAPI void -evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) -{ - 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(); - _evas_object_image_cleanup(obj, o); - if (!obj->layer->evas->engine.func->image_native_set) return; - if ((surf) && - ((surf->version < 2) || - (surf->version > EVAS_NATIVE_SURFACE_VERSION))) return; - o->engine_data = - obj->layer->evas->engine.func->image_native_set(obj->layer->evas->engine.data.output, - o->engine_data, - surf); -} - -EAPI Evas_Native_Surface * -evas_object_image_native_surface_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return NULL; - MAGIC_CHECK_END(); - if (!obj->layer->evas->engine.func->image_native_get) return NULL; - return obj->layer->evas->engine.func->image_native_get(obj->layer->evas->engine.data.output, - o->engine_data); -} - -EAPI void -evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint) -{ - 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(); - if (o->scale_hint == hint) return; -#ifdef EVAS_FRAME_QUEUING - if (o->engine_data) - evas_common_pipe_op_image_flush(o->engine_data); -#endif - o->scale_hint = hint; - if (o->engine_data) - { - int stride = 0; - - if (obj->layer->evas->engine.func->image_scale_hint_set) - obj->layer->evas->engine.func->image_scale_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->scale_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } -} - -EAPI Evas_Image_Scale_Hint -evas_object_image_scale_hint_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_IMAGE_SCALE_HINT_NONE; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EVAS_IMAGE_SCALE_HINT_NONE; - MAGIC_CHECK_END(); - return o->scale_hint; -} - -EAPI void -evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint) -{ - 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(); - if (o->content_hint == hint) return; -#ifdef EVAS_FRAME_QUEUING - if (o->engine_data) - evas_common_pipe_op_image_flush(o->engine_data); -#endif - o->content_hint = hint; - if (o->engine_data) - { - int stride = 0; - - if (obj->layer->evas->engine.func->image_content_hint_set) - obj->layer->evas->engine.func->image_content_hint_set - (obj->layer->evas->engine.data.output, - o->engine_data, o->content_hint); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = o->cur.image.w * 4; - o->cur.image.stride = stride; - } -} - -EAPI void -evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) -{ - Evas_Object_Image *o; - - if (!ismask) return; - - 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(); - - /* Convert to A8 if not already */ - - /* done */ - -} - -#define FRAME_MAX 1024 -EAPI Evas_Image_Content_Hint -evas_object_image_content_hint_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_IMAGE_CONTENT_HINT_NONE; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EVAS_IMAGE_CONTENT_HINT_NONE; - MAGIC_CHECK_END(); - return o->content_hint; -} - -EAPI Eina_Bool -evas_object_image_region_support_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *) (obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EINA_FALSE; - MAGIC_CHECK_END(); - - return obj->layer->evas->engine.func->image_can_region_get( - obj->layer->evas->engine.data.output, - o->engine_data); -} - -/* animated feature */ -EAPI Eina_Bool -evas_object_image_animated_get(const Evas_Object *obj) -{ - 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(); - - if (obj->layer->evas->engine.func->image_animated_get) - return obj->layer->evas->engine.func->image_animated_get(obj->layer->evas->engine.data.output, o->engine_data); - return EINA_FALSE; -} - -EAPI int -evas_object_image_animated_frame_count_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return -1; - MAGIC_CHECK_END(); - - if (!evas_object_image_animated_get(obj)) return -1; - if (obj->layer->evas->engine.func->image_animated_frame_count_get) - return obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); - return -1; -} - -EAPI Evas_Image_Animated_Loop_Hint -evas_object_image_animated_loop_type_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_IMAGE_ANIMATED_HINT_NONE; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EVAS_IMAGE_ANIMATED_HINT_NONE; - MAGIC_CHECK_END(); - - if (!evas_object_image_animated_get(obj)) return EVAS_IMAGE_ANIMATED_HINT_NONE; - - if (obj->layer->evas->engine.func->image_animated_loop_type_get) - return obj->layer->evas->engine.func->image_animated_loop_type_get(obj->layer->evas->engine.data.output, o->engine_data); - return EVAS_IMAGE_ANIMATED_HINT_NONE; -} - -EAPI int -evas_object_image_animated_loop_count_get(const Evas_Object *obj) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return -1; - MAGIC_CHECK_END(); - - if (!evas_object_image_animated_get(obj)) return -1; - - if (obj->layer->evas->engine.func->image_animated_loop_count_get) - return obj->layer->evas->engine.func->image_animated_loop_count_get(obj->layer->evas->engine.data.output, o->engine_data); - return -1; -} - -EAPI double -evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num) -{ - Evas_Object_Image *o; - int frame_count = 0; - - if (start_frame < 1) return -1; - if (frame_num < 0) return -1; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return -1; - MAGIC_CHECK_END(); - - if (!evas_object_image_animated_get(obj)) return -1; - - if (!obj->layer->evas->engine.func->image_animated_frame_count_get) return -1; - - frame_count = obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); - - if ((start_frame + frame_num) > frame_count) return -1; - if (obj->layer->evas->engine.func->image_animated_frame_duration_get) - return obj->layer->evas->engine.func->image_animated_frame_duration_get(obj->layer->evas->engine.data.output, o->engine_data, start_frame, frame_num); - return -1; -} - -EAPI void -evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index) -{ - Evas_Object_Image *o; - int frame_count = 0; - - 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(); - - if (!o->cur.file) return; - if (o->cur.frame == frame_index) return; - - if (!evas_object_image_animated_get(obj)) return; - - frame_count = evas_object_image_animated_frame_count_get(obj); - - /* limit the size of frame to FRAME_MAX */ - if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count)) - return; - - if (!obj->layer->evas->engine.func->image_animated_frame_set) return; - if (!obj->layer->evas->engine.func->image_animated_frame_set(obj->layer->evas->engine.data.output, o->engine_data, frame_index)) - return; - - o->prev.frame = o->cur.frame; - o->cur.frame = frame_index; - - o->changed = 1; - evas_object_change(obj); - -} - -EAPI void -evas_image_cache_flush(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - e->engine.func->image_cache_flush(e->engine.data.output); -} - -EAPI void -evas_image_cache_reload(Evas *e) -{ - Evas_Layer *layer; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - evas_image_cache_flush(e); - EINA_INLIST_FOREACH(e->layers, layer) - { - Evas_Object *obj; - - EINA_INLIST_FOREACH(layer->objects, obj) - { - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (o->magic == MAGIC_OBJ_IMAGE) - { - evas_object_image_unload(obj, 1); - evas_object_inform_call_image_unloaded(obj); - } - } - } - evas_image_cache_flush(e); - EINA_INLIST_FOREACH(e->layers, layer) - { - Evas_Object *obj; - - EINA_INLIST_FOREACH(layer->objects, obj) - { - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (o->magic == MAGIC_OBJ_IMAGE) - { - evas_object_image_load(obj); - o->changed = 1; - evas_object_change(obj); - } - } - } - evas_image_cache_flush(e); -} - -EAPI void -evas_image_cache_set(Evas *e, int size) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - if (size < 0) size = 0; - e->engine.func->image_cache_set(e->engine.data.output, size); -} - -EAPI int -evas_image_cache_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - - return e->engine.func->image_cache_get(e->engine.data.output); -} - -EAPI Eina_Bool -evas_image_max_size_get(const Evas *e, int *maxw, int *maxh) -{ - int w = 0, h = 0; - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return EINA_FALSE; - MAGIC_CHECK_END(); - - if (maxw) *maxw = 0xffff; - if (maxh) *maxh = 0xffff; - if (!e->engine.func->image_max_size_get) return EINA_FALSE; - e->engine.func->image_max_size_get(e->engine.data.output, &w, &h); - if (maxw) *maxw = w; - if (maxh) *maxh = h; - return EINA_TRUE; -} - -/* all nice and private */ -static void -_proxy_unset(Evas_Object *proxy) -{ - Evas_Object_Image *o; - - o = proxy->object_data; - if (!o->cur.source) return; - - o->cur.source->proxy.proxies = eina_list_remove(o->cur.source->proxy.proxies, proxy); - - o->cur.source = NULL; - if (o->cur.defmap) - { - evas_map_free(o->cur.defmap); - o->cur.defmap = NULL; - } -} - - -static void -_proxy_set(Evas_Object *proxy, Evas_Object *src) -{ - Evas_Object_Image *o; - - o = proxy->object_data; - - evas_object_image_file_set(proxy, NULL, NULL); - - o->cur.source = src; - - src->proxy.proxies = eina_list_append(src->proxy.proxies, proxy); - src->proxy.redraw = EINA_TRUE; -} - -/* Some moron just set a proxy on a proxy. - * Give them some pixels. A random color - */ -static void -_proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, - int x, int y) -{ - Evas_Func *func; - 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_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); - 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 = obj->layer->evas; - - if (obj->clip.clipees) return; - 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); -} -*/ - -/** - * Render the source object when a proxy is set. - * - * Used to force a draw if necessary, else just makes sures it's available. - */ -static void -_proxy_subrender(Evas *e, Evas_Object *source) -{ - void *ctx; -/* Evas_Object *obj2, *clip;*/ - int w, h; - - if (!source) return; - - w = source->cur.geometry.w; - h = source->cur.geometry.h; - - source->proxy.redraw = EINA_FALSE; - - /* We need to redraw surface then */ - 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.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); - evas_render_mapped(e, source, ctx, source->proxy.surface, - -source->cur.geometry.x, - -source->cur.geometry.y, - 1, 0, 0, e->output.w, e->output.h); - 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); -/* - 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) - { - _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); - } - - 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); - */ -} - -#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 - (obj->layer->evas->engine.data.output, - o->engine_data, - 0, 0, - o->cur.image.w, o->cur.image.h); - } - if (o->engine_data) - { - if (o->preloading) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, - o->engine_data); - } - o->engine_data = NULL; - o->load_error = EVAS_LOAD_ERROR_NONE; - o->cur.has_alpha = 1; - o->cur.cspace = EVAS_COLORSPACE_ARGB8888; - o->cur.image.w = 0; - o->cur.image.h = 0; - o->cur.image.stride = 0; -} - -static void -evas_object_image_load(Evas_Object *obj) -{ - Evas_Object_Image *o; - Evas_Image_Load_Opts lo; - - o = (Evas_Object_Image *)(obj->object_data); - if (o->engine_data) return; - - lo.scale_down_by = o->load_opts.scale_down_by; - lo.dpi = o->load_opts.dpi; - lo.w = o->load_opts.w; - lo.h = o->load_opts.h; - lo.region.x = o->load_opts.region.x; - 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, - &o->load_error, - &lo); - if (o->engine_data) - { - int w, h; - int stride = 0; - - obj->layer->evas->engine.func->image_size_get - (obj->layer->evas->engine.data.output, - o->engine_data, &w, &h); - if (obj->layer->evas->engine.func->image_stride_get) - obj->layer->evas->engine.func->image_stride_get - (obj->layer->evas->engine.data.output, - o->engine_data, &stride); - else - stride = w * 4; - o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get - (obj->layer->evas->engine.data.output, - o->engine_data); - o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get - (obj->layer->evas->engine.data.output, - o->engine_data); - o->cur.image.w = w; - o->cur.image.h = h; - o->cur.image.stride = stride; - } - else - { - o->load_error = EVAS_LOAD_ERROR_GENERIC; - } -} - -static Evas_Coord -evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) -{ - Evas_Coord w; - - w = ((size * obj->layer->evas->output.w) / - (Evas_Coord)obj->layer->evas->viewport.w); - if (size <= 0) size = 1; - if (start > 0) - { - while (start - size > 0) start -= size; - } - else if (start < 0) - { - while (start < 0) start += size; - } - start = ((start * obj->layer->evas->output.w) / - (Evas_Coord)obj->layer->evas->viewport.w); - *size_ret = w; - return start; -} - -static Evas_Coord -evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) -{ - Evas_Coord h; - - h = ((size * obj->layer->evas->output.h) / - (Evas_Coord)obj->layer->evas->viewport.h); - if (size <= 0) size = 1; - if (start > 0) - { - while (start - size > 0) start -= size; - } - else if (start < 0) - { - while (start < 0) start += size; - } - start = ((start * obj->layer->evas->output.h) / - (Evas_Coord)obj->layer->evas->viewport.h); - *size_ret = h; - return start; -} - -static void -evas_object_image_init(Evas_Object *obj) -{ - /* alloc image ob, setup methods and default values */ - obj->object_data = evas_object_image_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - obj->cur.anti_alias = 0; - obj->cur.render_op = EVAS_RENDER_BLEND; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; -} - -static void * -evas_object_image_new(void) -{ - Evas_Object_Image *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 256, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Image); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Image); - o->magic = MAGIC_OBJ_IMAGE; - o->cur.fill.w = 0; - o->cur.fill.h = 0; - o->cur.smooth_scale = 1; - o->cur.border.fill = 1; - o->cur.border.scale = 1.0; - o->cur.cspace = EVAS_COLORSPACE_ARGB8888; - o->cur.spread = EVAS_TEXTURE_REPEAT; - o->cur.opaque_valid = 0; - o->cur.source = NULL; - o->prev = o->cur; - o->tmpf_fd = -1; - return o; -} - -static void -evas_object_image_free(Evas_Object *obj) -{ - Evas_Object_Image *o; - Eina_Rectangle *r; - - /* frees private object data. very simple here */ - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return; - MAGIC_CHECK_END(); - /* free obj */ - _cleanup_tmpf(obj); - if (o->cur.file) eina_stringshare_del(o->cur.file); - if (o->cur.key) eina_stringshare_del(o->cur.key); - if (o->cur.source) _proxy_unset(obj); - if (o->engine_data) - { - if (o->preloading) - { - o->preloading = 0; - obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, - o->engine_data, - obj); - } - obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, - o->engine_data); - } - if (o->video_surface) - { - o->video_surface = 0; - obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); - } - o->engine_data = NULL; - o->magic = 0; - EINA_LIST_FREE(o->pixel_updates, r) - eina_rectangle_free(r); - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -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, uvw, uvh; - void *pixels; - - /* render object to surface with context, and offset by x,y */ - o = (Evas_Object_Image *)(obj->object_data); - - if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) - return; /* no error message, already printed in pre_render */ - - /* Proxy sanity */ - if (o->proxyrendering) - { - _proxy_error(obj, context, output, surface, x, y); - return; - } - - /* We are displaying the overlay */ - if (o->video_visible) - { - /* Create a transparent rectangle */ - obj->layer->evas->engine.func->context_color_set(output, - context, - 0, 0, 0, 0); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_render_op_set(output, context, - EVAS_RENDER_COPY); - obj->layer->evas->engine.func->rectangle_draw(output, - context, - surface, - obj->cur.geometry.x + x, - obj->cur.geometry.y + y, - obj->cur.geometry.w, - obj->cur.geometry.h); - - return ; - } - - obj->layer->evas->engine.func->context_color_set(output, - context, - 255, 255, 255, 255); - - if ((obj->cur.cache.clip.r == 255) && - (obj->cur.cache.clip.g == 255) && - (obj->cur.cache.clip.b == 255) && - (obj->cur.cache.clip.a == 255)) - { - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - } - else - obj->layer->evas->engine.func->context_multiplier_set(output, - context, - obj->cur.cache.clip.r, - obj->cur.cache.clip.g, - obj->cur.cache.clip.b, - obj->cur.cache.clip.a); - - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur.render_op); - - if (!o->cur.source) - { - 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) - { - Evas_Object_Image *oi; - oi = o->cur.source->object_data; - 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 - { - o->proxyrendering = 1; - _proxy_subrender(obj->layer->evas, o->cur.source); - 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; - int ix, iy, iw, ih; - int img_set = 0; - - if (o->dirty_pixels) - { - if (o->func.get_pixels) - { - // Set img object for direct rendering optimization - // Check for image w/h against image geometry w/h - // Check for image color r,g,b,a = {255,255,255,255} - // Check and make sure that there are no maps. - if ( (obj->cur.geometry.w == o->cur.image.w) && - (obj->cur.geometry.h == o->cur.image.h) && - (obj->cur.color.r == 255) && - (obj->cur.color.g == 255) && - (obj->cur.color.b == 255) && - (obj->cur.color.a == 255) && - (!obj->cur.map) ) - { - if (obj->layer->evas->engine.func->gl_img_obj_set) - { - obj->layer->evas->engine.func->gl_img_obj_set(output, obj, o->cur.has_alpha); - img_set = 1; - } - } - - o->func.get_pixels(o->func.get_pixels_data, obj); - if (o->engine_data != pixels) - pixels = o->engine_data; - 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; - } - if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap)) - { - const Evas_Map_Point *p, *p_end; - RGBA_Map_Point pts[obj->cur.map->count], *pt; - - 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; - pts[0].z0 = obj->cur.map->persp.z0 << FP; - // draw geom +x +y - for (; p < p_end; p++, pt++) - { - pt->x = (lround(p->x) + x) * FP1; - pt->y = (lround(p->y) + y) * FP1; - pt->z = (lround(p->z) ) * FP1; - pt->fx = p->px; - pt->fy = p->py; - pt->fz = p->z; - pt->u = ((lround(p->u) * imagew) / uvw) * FP1; - pt->v = ((lround(p->v) * imageh) / uvh) * FP1; - if (pt->u < 0) pt->u = 0; - else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1); - if (pt->v < 0) pt->v = 0; - 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) - { - pts[obj->cur.map->count] = pts[obj->cur.map->count -1]; - } - - obj->layer->evas->engine.func->image_map_draw - (output, context, surface, pixels, obj->cur.map->count, - pts, o->cur.smooth_scale | obj->cur.map->smooth, 0); - } - else - { - obj->layer->evas->engine.func->image_scale_hint_set(output, - pixels, - o->scale_hint); - /* This is technically a bug here: If the value is recreated - * (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); - 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 ((int)idx < obj->cur.geometry.w) - { - Evas_Coord ydy; - int dobreak_w = 0; - - ydy = idy; - ix = idx; - if ((o->cur.fill.w == obj->cur.geometry.w) && - (o->cur.fill.x == 0)) - { - dobreak_w = 1; - iw = obj->cur.geometry.w; - } - else - iw = ((int)(idx + idw)) - ix; - while ((int)idy < obj->cur.geometry.h) - { - int dobreak_h = 0; - - iy = idy; - if ((o->cur.fill.h == obj->cur.geometry.h) && - (o->cur.fill.y == 0)) - { - ih = obj->cur.geometry.h; - dobreak_h = 1; - } - else - ih = ((int)(idy + idh)) - iy; - if ((o->cur.border.l == 0) && - (o->cur.border.r == 0) && - (o->cur.border.t == 0) && - (o->cur.border.b == 0) && - (o->cur.border.fill != 0)) - obj->layer->evas->engine.func->image_draw(output, - context, - surface, - pixels, - 0, 0, - imagew, - imageh, - obj->cur.geometry.x + ix + x, - obj->cur.geometry.y + iy + y, - iw, ih, - o->cur.smooth_scale); - else - { - int inx, iny, inw, inh, outx, outy, outw, outh; - int bl, br, bt, bb, bsl, bsr, bst, bsb; - int imw, imh, ox, oy; - - ox = obj->cur.geometry.x + ix + x; - oy = obj->cur.geometry.y + iy + y; - imw = imagew; - imh = imageh; - bl = o->cur.border.l; - br = o->cur.border.r; - bt = o->cur.border.t; - bb = o->cur.border.b; - if ((bl + br) > iw) - { - bl = iw / 2; - br = iw - bl; - } - if ((bl + br) > imw) - { - bl = imw / 2; - br = imw - bl; - } - if ((bt + bb) > ih) - { - bt = ih / 2; - bb = ih - bt; - } - if ((bt + bb) > imh) - { - bt = imh / 2; - bb = imh - bt; - } - if (o->cur.border.scale != 1.0) - { - bsl = ((double)bl * o->cur.border.scale); - bsr = ((double)br * o->cur.border.scale); - bst = ((double)bt * o->cur.border.scale); - bsb = ((double)bb * o->cur.border.scale); - } - else - { - bsl = bl; bsr = br; bst = bt; bsb = bb; - } - // #-- - // | - inx = 0; iny = 0; - inw = bl; inh = bt; - outx = ox; outy = oy; - outw = bsl; outh = bst; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // .## - // | - inx = bl; iny = 0; - inw = imw - bl - br; inh = bt; - outx = ox + bsl; outy = oy; - outw = iw - bsl - bsr; outh = bst; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // --# - // | - inx = imw - br; iny = 0; - inw = br; inh = bt; - outx = ox + iw - bsr; outy = oy; - outw = bsr; outh = bst; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // .-- - // # - inx = 0; iny = bt; - inw = bl; inh = imh - bt - bb; - outx = ox; outy = oy + bst; - outw = bsl; outh = ih - bst - bsb; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // .--. - // |##| - if (o->cur.border.fill > EVAS_BORDER_FILL_NONE) - { - inx = bl; iny = bt; - inw = imw - bl - br; inh = imh - bt - bb; - outx = ox + bsl; outy = oy + bst; - outw = iw - bsl - bsr; outh = ih - bst - bsb; - if ((o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && - (obj->cur.cache.clip.a == 255) && - (obj->cur.render_op == EVAS_RENDER_BLEND)) - { - obj->layer->evas->engine.func->context_render_op_set(output, context, - EVAS_RENDER_COPY); - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur.render_op); - } - else - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - } - // --. - // # - inx = imw - br; iny = bt; - inw = br; inh = imh - bt - bb; - outx = ox + iw - bsr; outy = oy + bst; - outw = bsr; outh = ih - bst - bsb; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // | - // #-- - inx = 0; iny = imh - bb; - inw = bl; inh = bb; - outx = ox; outy = oy + ih - bsb; - outw = bsl; outh = bsb; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // | - // .## - inx = bl; iny = imh - bb; - inw = imw - bl - br; inh = bb; - outx = ox + bsl; outy = oy + ih - bsb; - outw = iw - bsl - bsr; outh = bsb; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - // | - // --# - inx = imw - br; iny = imh - bb; - inw = br; inh = bb; - outx = ox + iw - bsr; outy = oy + ih - bsb; - outw = bsr; outh = bsb; - obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); - } - idy += idh; - if (dobreak_h) break; - } - idx += idw; - idy = ydy; - if (dobreak_w) break; - } - } - - // Unset img object - if (img_set) - { - if (obj->layer->evas->engine.func->gl_img_obj_set) - { - obj->layer->evas->engine.func->gl_img_obj_set(output, NULL, 0); - img_set = 0; - } - } - } -} - -static void -evas_object_image_render_pre(Evas_Object *obj) -{ - Evas_Object_Image *o; - int is_v = 0, was_v = 0; - Evas *e; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before */ - /* rendering. this could mean loading the image data, retrieving it from */ - /* elsewhere, decoding video etc. */ - /* then when this is done the object needs to figure if it changed and */ - /* if so what and where and add the appropriate redraw rectangles */ - o = (Evas_Object_Image *)(obj->object_data); - e = obj->layer->evas; - - 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); - return; - } - - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* Proxy: Do it early */ - if (o->cur.source && - (o->cur.source->proxy.redraw || o->cur.source->changed)) - { - /* XXX: Do I need to sort out the map here? */ - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - goto done; - } - - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&e->clip_changes, obj, is_v, was_v); - if (!o->pixel_updates) goto done; - } - if ((obj->cur.map != obj->prev.map) || - (obj->cur.usemap != obj->prev.usemap)) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - goto done; - } - /* it's not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&e->clip_changes, obj); - /* if we restacked (layer or just within a layer) and don't clip anyone */ - if (obj->restack) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - /* if it changed render op */ - if (obj->cur.render_op != obj->prev.render_op) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - /* if it changed anti_alias */ - if (obj->cur.anti_alias != obj->prev.anti_alias) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if (o->changed) - { - if (((o->cur.file) && (!o->prev.file)) || - ((!o->cur.file) && (o->prev.file)) || - ((o->cur.key) && (!o->prev.key)) || - ((!o->cur.key) && (o->prev.key)) - ) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if ((o->cur.image.w != o->prev.image.w) || - (o->cur.image.h != o->prev.image.h) || - (o->cur.has_alpha != o->prev.has_alpha) || - (o->cur.cspace != o->prev.cspace) || - (o->cur.smooth_scale != o->prev.smooth_scale)) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if ((o->cur.border.l != o->prev.border.l) || - (o->cur.border.r != o->prev.border.r) || - (o->cur.border.t != o->prev.border.t) || - (o->cur.border.b != o->prev.border.b) || - (o->cur.border.fill != o->prev.border.fill) || - (o->cur.border.scale != o->prev.border.scale)) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if (o->dirty_pixels) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if (o->cur.frame != o->prev.frame) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - - } - /* if it changed geometry - and obviously not visibility or color */ - /* calculate differences since we have a constant color fill */ - /* we really only need to update the differences */ -#if 0 // XXX: maybe buggy? - if (((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h)) && - (o->cur.fill.w == o->prev.fill.w) && - (o->cur.fill.h == o->prev.fill.h) && - ((o->cur.fill.x + obj->cur.geometry.x) == (o->prev.fill.x + obj->prev.geometry.x)) && - ((o->cur.fill.y + obj->cur.geometry.y) == (o->prev.fill.y + obj->prev.geometry.y)) && - (!o->pixel_updates) - ) - { - evas_rects_return_difference_rects(&e->clip_changes, - obj->cur.geometry.x, - obj->cur.geometry.y, - obj->cur.geometry.w, - obj->cur.geometry.h, - obj->prev.geometry.x, - obj->prev.geometry.y, - obj->prev.geometry.w, - obj->prev.geometry.h); - if (!o->pixel_updates) goto done; - } -#endif - if (((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h)) - ) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - if (o->changed) - { - if ((o->cur.fill.x != o->prev.fill.x) || - (o->cur.fill.y != o->prev.fill.y) || - (o->cur.fill.w != o->prev.fill.w) || - (o->cur.fill.h != o->prev.fill.h)) - { - evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); - if (!o->pixel_updates) goto done; - } - 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 * w) / o->cur.image.w; - r.y = (rr->y * h) / o->cur.image.h; - r.w = ((rr->w * w) + (o->cur.image.w * 2) - 1) / o->cur.image.w; - r.h = ((rr->h * h) + (o->cur.image.h * 2) - 1) / o->cur.image.h; - r.x += obj->cur.geometry.x + x; - r.y += obj->cur.geometry.y + y; - RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h, - obj->cur.cache.clip.x, obj->cur.cache.clip.y, - obj->cur.cache.clip.w, obj->cur.cache.clip.h); - 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); - 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 */ - if (evas_object_is_visible(obj) && - evas_object_is_opaque(obj)) - { - Evas_Coord x, y, w, h; - - x = obj->cur.cache.clip.x; - y = obj->cur.cache.clip.y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - if (obj->cur.clipper) - { - 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); - } - e->engine.func->output_redraws_rect_del(e->engine.data.output, - x, y, w, h); - } - done: - evas_object_render_pre_effect_updates(&e->clip_changes, obj, is_v, was_v); -} - -static void -evas_object_image_render_post(Evas_Object *obj) -{ - Evas_Object_Image *o; - Eina_Rectangle *r; - - /* this moves the current data to the previous state parts of the object */ - /* in whatever way is safest for the object. also if we don't need object */ - /* data anymore we can free it if the object deems this is a good idea */ - o = (Evas_Object_Image *)(obj->object_data); - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - EINA_LIST_FREE(o->pixel_updates, r) - eina_rectangle_free(r); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; - o->prev = o->cur; - o->changed = 0; - /* FIXME: copy strings across */ -} - -static unsigned int evas_object_image_id_get(Evas_Object *obj) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_IMAGE; -} - -static unsigned int evas_object_image_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_IMAGE; -} - -static void *evas_object_image_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} - -static int -evas_object_image_is_opaque(Evas_Object *obj) -{ - Evas_Object_Image *o; - - /* this returns 1 if the internal object data implies that the object is */ - /* currently fully opaque over the entire rectangle it occupies */ - o = (Evas_Object_Image *)(obj->object_data); -/* disable caching due tyo maps screwing with this - o->cur.opaque_valid = 0; - if (o->cur.opaque_valid) - { - if (!o->cur.opaque) return 0; - } - else -*/ - { - o->cur.opaque = 0; -/* disable caching */ -/* o->cur.opaque_valid = 1; */ - if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) - return o->cur.opaque; - if (((o->cur.border.l != 0) || - (o->cur.border.r != 0) || - (o->cur.border.t != 0) || - (o->cur.border.b != 0)) && - (!o->cur.border.fill)) return o->cur.opaque; - if (!o->engine_data) return o->cur.opaque; - o->cur.opaque = 1; - } - // FIXME: use proxy - if (o->cur.source) - { - o->cur.opaque = evas_object_is_opaque(o->cur.source); - return o->cur.opaque; /* FIXME: Should go poke at the object */ - } - if (o->cur.has_alpha) - { - o->cur.opaque = 0; - return o->cur.opaque; - } - if ((obj->cur.map) && (obj->cur.usemap)) - { - Evas_Map *m = obj->cur.map; - - if ((m->points[0].a == 255) && - (m->points[1].a == 255) && - (m->points[2].a == 255) && - (m->points[3].a == 255)) - { - if ( - ((m->points[0].x == m->points[3].x) && - (m->points[1].x == m->points[2].x) && - (m->points[0].y == m->points[1].y) && - (m->points[2].y == m->points[3].y)) - || - ((m->points[0].x == m->points[1].x) && - (m->points[2].x == m->points[3].x) && - (m->points[0].y == m->points[3].y) && - (m->points[1].y == m->points[2].y)) - ) - { - if ((m->points[0].x == obj->cur.geometry.x) && - (m->points[0].y == obj->cur.geometry.y) && - (m->points[2].x == (obj->cur.geometry.x + obj->cur.geometry.w)) && - (m->points[2].y == (obj->cur.geometry.y + obj->cur.geometry.h))) - return o->cur.opaque; - } - } - o->cur.opaque = 0; - return o->cur.opaque; - } - if (obj->cur.render_op == EVAS_RENDER_COPY) return o->cur.opaque; - return o->cur.opaque; -} - -static int -evas_object_image_was_opaque(Evas_Object *obj) -{ - Evas_Object_Image *o; - - /* this returns 1 if the internal object data implies that the object was */ - /* previously fully opaque over the entire rectangle it occupies */ - o = (Evas_Object_Image *)(obj->object_data); - if (o->prev.opaque_valid) - { - if (!o->prev.opaque) return 0; - } - else - { - o->prev.opaque = 0; - o->prev.opaque_valid = 1; - if ((o->prev.fill.w < 1) || (o->prev.fill.h < 1)) - return 0; - if (((o->prev.border.l != 0) || - (o->prev.border.r != 0) || - (o->prev.border.t != 0) || - (o->prev.border.b != 0)) && - (!o->prev.border.fill)) return 0; - 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; - if (o->prev.has_alpha) return 0; - if (obj->prev.render_op != EVAS_RENDER_BLEND) return 0; - return 1; -} - -static int -evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - Evas_Object_Image *o; - DATA32 *data; - int w, h, stride, iw, ih; - int a; - - o = (Evas_Object_Image *)(obj->object_data); - - x -= obj->cur.cache.clip.x; - y -= obj->cur.cache.clip.y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - iw = o->cur.image.w; - ih = o->cur.image.h; - - 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; - y = obj->cur.map->my; - } - else - { - int bl, br, bt, bb, bsl, bsr, bst, bsb; - - bl = o->cur.border.l; - br = o->cur.border.r; - bt = o->cur.border.t; - bb = o->cur.border.b; - if ((bl + br) > iw) - { - bl = iw / 2; - br = iw - bl; - } - if ((bl + br) > iw) - { - bl = iw / 2; - br = iw - bl; - } - if ((bt + bb) > ih) - { - bt = ih / 2; - bb = ih - bt; - } - if ((bt + bb) > ih) - { - bt = ih / 2; - bb = ih - bt; - } - if (o->cur.border.scale != 1.0) - { - bsl = ((double)bl * o->cur.border.scale); - bsr = ((double)br * o->cur.border.scale); - bst = ((double)bt * o->cur.border.scale); - bsb = ((double)bb * o->cur.border.scale); - } - else - { - bsl = bl; bsr = br; bst = bt; bsb = bb; - } - - w = o->cur.fill.w; - h = o->cur.fill.h; - x -= o->cur.fill.x; - y -= o->cur.fill.y; - x %= w; - y %= h; - - if (x < 0) x += w; - if (y < 0) y += h; - - if (o->cur.border.fill != EVAS_BORDER_FILL_DEFAULT) - { - if ((x > bsl) && (x < (w - bsr)) && - (y > bst) && (y < (h - bsb))) - { - if (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) return 1; - return 0; - } - } - - if (x < bsl) x = (x * bl) / bsl; - else if (x > (w - bsr)) x = iw - (((w - x) * br) / bsr); - else if ((bsl + bsr) < w) x = bl + (((x - bsl) * (iw - bl - br)) / (w - bsl - bsr)); - else return 1; - - if (y < bst) y = (y * bt) / bst; - else if (y > (h - bsb)) y = ih - (((h - y) * bb) / bsb); - else if ((bst + bsb) < h) y = bt + (((y - bst) * (ih - bt - bb)) / (h - bst - bsb)); - else return 1; - } - - if (x < 0) x = 0; - if (y < 0) y = 0; - if (x >= iw) x = iw - 1; - if (y >= ih) y = ih - 1; - - stride = o->cur.image.stride; - - o->engine_data = obj->layer->evas->engine.func->image_data_get - (obj->layer->evas->engine.data.output, - o->engine_data, - 0, - &data, - &o->load_error); - if (!data) - return 0; - - switch (o->cur.cspace) - { - case EVAS_COLORSPACE_ARGB8888: - data = ((DATA32*)(data) + ((y * (stride >> 2)) + x)); - a = (*((DATA32*)(data)) >> 24) & 0xff; - break; - case EVAS_COLORSPACE_RGB565_A5P: - data = (void*) ((DATA16*)(data) + (h * (stride >> 1))); - data = (void*) ((DATA8*)(data) + ((y * (stride >> 1)) + x)); - a = (*((DATA8*)(data))) & 0x1f; - break; - default: - return 1; - break; - } - - return (a != 0); -} - -static int -evas_object_image_has_opaque_rect(Evas_Object *obj) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if ((obj->cur.map) && (obj->cur.usemap)) return 0; - if (((o->cur.border.l | o->cur.border.r | o->cur.border.t | o->cur.border.b) != 0) && - (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && - (obj->cur.render_op == EVAS_RENDER_BLEND) && - (obj->cur.cache.clip.a == 255) && - (o->cur.fill.x == 0) && - (o->cur.fill.y == 0) && - (o->cur.fill.w == obj->cur.geometry.w) && - (o->cur.fill.h == obj->cur.geometry.h) - ) return 1; - return 0; -} - -static int -evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (o->cur.border.scale == 1.0) - { - *x = obj->cur.geometry.x + o->cur.border.l; - *y = obj->cur.geometry.y + o->cur.border.t; - *w = obj->cur.geometry.w - (o->cur.border.l + o->cur.border.r); - if (*w < 0) *w = 0; - *h = obj->cur.geometry.h - (o->cur.border.t + o->cur.border.b); - if (*h < 0) *h = 0; - } - else - { - *x = obj->cur.geometry.x + (o->cur.border.l * o->cur.border.scale); - *y = obj->cur.geometry.y + (o->cur.border.t * o->cur.border.scale); - *w = obj->cur.geometry.w - ((o->cur.border.l * o->cur.border.scale) + (o->cur.border.r * o->cur.border.scale)); - if (*w < 0) *w = 0; - *h = obj->cur.geometry.h - ((o->cur.border.t * o->cur.border.scale) + (o->cur.border.b * o->cur.border.scale)); - if (*h < 0) *h = 0; - } - return 1; -} - -static int -evas_object_image_can_map(Evas_Object *obj __UNUSED__) -{ - return 1; -} - -static void * -evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace) -{ - void *out = NULL; - - if (!data) - return NULL; - - switch (o->cur.cspace) - { - case EVAS_COLORSPACE_ARGB8888: - out = evas_common_convert_argb8888_to(data, - o->cur.image.w, - o->cur.image.h, - o->cur.image.stride >> 2, - o->cur.has_alpha, - to_cspace); - break; - case EVAS_COLORSPACE_RGB565_A5P: - out = evas_common_convert_rgb565_a5p_to(data, - o->cur.image.w, - o->cur.image.h, - o->cur.image.stride >> 1, - o->cur.has_alpha, - to_cspace); - break; - case EVAS_COLORSPACE_YCBCR422601_PL: - out = evas_common_convert_yuv_422_601_to(data, - o->cur.image.w, - o->cur.image.h, - to_cspace); - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - out = evas_common_convert_yuv_422P_601_to(data, - o->cur.image.w, - o->cur.image.h, - to_cspace); - break; - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - out = evas_common_convert_yuv_420_601_to(data, - o->cur.image.w, - o->cur.image.h, - to_cspace); - break; - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - out = evas_common_convert_yuv_420T_601_to(data, - o->cur.image.w, - o->cur.image.h, - to_cspace); - break; - default: - WRN("unknow colorspace: %i\n", o->cur.cspace); - break; - } - - return out; -} - -static void -evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__) -{ - Evas_Coord w, h; - - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - evas_object_image_fill_set(obj, 0, 0, w, h); -} - - -Eina_Bool -_evas_object_image_preloading_get(const Evas_Object *obj) -{ - Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - if (!o) return EINA_FALSE; - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return EINA_FALSE; - MAGIC_CHECK_END(); - return o->preloading; -} - -void -_evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading) -{ - Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - 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); -} - -Evas_Object * -_evas_object_image_video_parent_get(Evas_Object *obj) -{ - Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - - return o->video_surface ? o->video.parent : NULL; -} - -void -_evas_object_image_video_overlay_show(Evas_Object *obj) -{ - Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - - if (obj->cur.cache.clip.x != obj->prev.cache.clip.x || - obj->cur.cache.clip.y != obj->prev.cache.clip.y || - o->created || !o->video_visible) - o->video.move(o->video.data, obj, &o->video, obj->cur.cache.clip.x, obj->cur.cache.clip.y); - if (obj->cur.cache.clip.w != obj->prev.cache.clip.w || - obj->cur.cache.clip.h != obj->prev.cache.clip.h || - o->created || !o->video_visible) - o->video.resize(o->video.data, obj, &o->video, obj->cur.cache.clip.w, obj->cur.cache.clip.h); - if (!o->video_visible || o->created) - { - o->video.show(o->video.data, obj, &o->video); - } - else - { - /* Cancel dirty on the image */ - Eina_Rectangle *r; - - o->dirty_pixels = 0; - EINA_LIST_FREE(o->pixel_updates, r) - eina_rectangle_free(r); - } - o->video_visible = EINA_TRUE; - o->created = EINA_FALSE; -} - -void -_evas_object_image_video_overlay_hide(Evas_Object *obj) -{ - Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - - if (o->video_visible || o->created) - o->video.hide(o->video.data, obj, &o->video); - if (evas_object_is_visible(obj)) - o->video.update_pixels(o->video.data, obj, &o->video); - o->video_visible = EINA_FALSE; - o->created = EINA_FALSE; -} - -/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_object_inform.c b/libraries/evas/src/lib/canvas/evas_object_inform.c deleted file mode 100644 index 302da42..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_inform.c +++ /dev/null @@ -1,79 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* local calls */ - -void -evas_object_inform_call_show(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_hide(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_move(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_resize(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_restack(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_changed_size_hints(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -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(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} - -void -evas_object_inform_call_image_unloaded(Evas_Object *obj) -{ - _evas_object_event_new(); - - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); -} diff --git a/libraries/evas/src/lib/canvas/evas_object_intercept.c b/libraries/evas/src/lib/canvas/evas_object_intercept.c deleted file mode 100644 index 54f7265..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_intercept.c +++ /dev/null @@ -1,585 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* local calls */ - -static void evas_object_intercept_init(Evas_Object *obj); -static void evas_object_intercept_deinit(Evas_Object *obj); - -static void -evas_object_intercept_init(Evas_Object *obj) -{ - if (!obj->interceptors) - obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); -} - -static void -evas_object_intercept_deinit(Evas_Object *obj) -{ - if (!obj->interceptors) return; - if ((obj->interceptors->show.func) || - (obj->interceptors->hide.func) || - (obj->interceptors->move.func) || - (obj->interceptors->resize.func) || - (obj->interceptors->raise.func) || - (obj->interceptors->lower.func) || - (obj->interceptors->stack_above.func) || - (obj->interceptors->stack_below.func) || - (obj->interceptors->layer_set.func) || - (obj->interceptors->color_set.func) || - (obj->interceptors->clip_set.func) || - (obj->interceptors->clip_unset.func)) - return; - free(obj->interceptors); - obj->interceptors = NULL; -} - -/* private calls */ - -void -evas_object_intercept_cleanup(Evas_Object *obj) -{ - if (obj->interceptors) free(obj->interceptors); -} - -int -evas_object_intercept_call_show(Evas_Object *obj) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->show.func); - if (ret) - obj->interceptors->show.func(obj->interceptors->show.data, obj); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_hide(Evas_Object *obj) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->hide.func); - if (ret) - obj->interceptors->hide.func(obj->interceptors->hide.data, obj); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->move.func); - if (ret) - obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->resize.func); - if (ret) - obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_raise(Evas_Object *obj) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->raise.func); - if (ret) - obj->interceptors->raise.func(obj->interceptors->raise.data, obj); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_lower(Evas_Object *obj) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->lower.func); - if (ret) - obj->interceptors->lower.func(obj->interceptors->lower.data, obj); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->stack_above.func); - if (ret) - obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->stack_below.func); - if (ret) - obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_layer_set(Evas_Object *obj, int l) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->layer_set.func); - if (ret) - obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->color_set.func); - if (ret) - obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->clip_set.func); - if (ret) - obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); - obj->intercepted = EINA_FALSE; - return ret; -} - -int -evas_object_intercept_call_clip_unset(Evas_Object *obj) -{ - int ret; - - if (!obj->interceptors) return 0; - if (obj->intercepted) return 0; - obj->intercepted = EINA_TRUE; - ret = !!(obj->interceptors->clip_unset.func); - if (ret) - obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); - obj->intercepted = EINA_FALSE; - return ret; -} - -/* public calls */ - -EAPI void -evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->show.func = func; - obj->interceptors->show.data = (void *)data; -} - -EAPI void * -evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->show.func = NULL; - data = obj->interceptors->show.data; - obj->interceptors->show.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->hide.func = func; - obj->interceptors->hide.data = (void *)data; -} - -EAPI void * -evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->hide.func = NULL; - data = obj->interceptors->hide.data; - obj->interceptors->hide.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->move.func = func; - obj->interceptors->move.data = (void *)data; -} - -EAPI void * -evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->move.func = NULL; - data = obj->interceptors->move.data; - obj->interceptors->move.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->resize.func = func; - obj->interceptors->resize.data = (void *)data; -} - -EAPI void * -evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->resize.func = NULL; - data = obj->interceptors->resize.data; - obj->interceptors->resize.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->raise.func = func; - obj->interceptors->raise.data = (void *)data; -} - -EAPI void * -evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->raise.func = NULL; - data = obj->interceptors->raise.data; - obj->interceptors->raise.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->lower.func = func; - obj->interceptors->lower.data = (void *)data; -} - -EAPI void * -evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->lower.func = NULL; - data = obj->interceptors->lower.data; - obj->interceptors->lower.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->stack_above.func = func; - obj->interceptors->stack_above.data = (void *)data; -} - -EAPI void * -evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->stack_above.func = NULL; - data = obj->interceptors->stack_above.data; - obj->interceptors->stack_above.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->stack_below.func = func; - obj->interceptors->stack_below.data = (void *)data; -} - -EAPI void * -evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->stack_below.func = NULL; - data = obj->interceptors->stack_below.data; - obj->interceptors->stack_below.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->layer_set.func = func; - obj->interceptors->layer_set.data = (void *)data; -} - -EAPI void * -evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->layer_set.func = NULL; - data = obj->interceptors->layer_set.data; - obj->interceptors->layer_set.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->color_set.func = func; - obj->interceptors->color_set.data = (void *)data; -} - -EAPI void * -evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->color_set.func = NULL; - data = obj->interceptors->color_set.data; - obj->interceptors->color_set.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->clip_set.func = func; - obj->interceptors->clip_set.data = (void *)data; -} - -EAPI void * -evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->clip_set.func = NULL; - data = obj->interceptors->clip_set.data; - obj->interceptors->clip_set.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} - -EAPI void -evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (!func) return; - evas_object_intercept_init(obj); - if (!obj->interceptors) return; - obj->interceptors->clip_unset.func = func; - obj->interceptors->clip_unset.data = (void *)data; -} - -EAPI void * -evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) -{ - void *data; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (!func) return NULL; - if (!obj->interceptors) return NULL; - obj->interceptors->clip_unset.func = NULL; - data = obj->interceptors->clip_unset.data; - obj->interceptors->clip_unset.data = NULL; - evas_object_intercept_deinit(obj); - return data; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_line.c b/libraries/evas/src/lib/canvas/evas_object_line.c deleted file mode 100644 index b09a6e2..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_line.c +++ /dev/null @@ -1,461 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* private magic number for line objects */ -static const char o_type[] = "line"; - -/* private struct for line object internal data */ -typedef struct _Evas_Object_Line Evas_Object_Line; - -struct _Evas_Object_Line -{ - DATA32 magic; - struct { - struct { - int x1, y1, x2, y2; - struct { - Evas_Coord w, h; - } object; - } cache; - Evas_Coord x1, y1, x2, y2; - } cur, prev; - - void *engine_data; - - char changed : 1; -}; - -/* private methods for line objects */ -static void evas_object_line_init(Evas_Object *obj); -static void *evas_object_line_new(void); -static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_line_free(Evas_Object *obj); -static void evas_object_line_render_pre(Evas_Object *obj); -static void evas_object_line_render_post(Evas_Object *obj); - -static unsigned int evas_object_line_id_get(Evas_Object *obj); -static unsigned int evas_object_line_visual_id_get(Evas_Object *obj); -static void *evas_object_line_engine_data_get(Evas_Object *obj); - -static int evas_object_line_is_opaque(Evas_Object *obj); -static int evas_object_line_was_opaque(Evas_Object *obj); -static int evas_object_line_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -static int evas_object_line_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -static void evas_object_line_coords_recalc(Evas_Object *obj); - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_line_free, - evas_object_line_render, - evas_object_line_render_pre, - evas_object_line_render_post, - evas_object_line_id_get, - evas_object_line_visual_id_get, - evas_object_line_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_line_is_opaque, - evas_object_line_was_opaque, - evas_object_line_is_inside, - evas_object_line_was_inside, - evas_object_line_coords_recalc, - NULL, - NULL, - NULL, - NULL -}; - -/* the actual api call to add a rect */ -/* it has no other api calls as all properties are standard */ - -EVAS_MEMPOOL(_mp_obj); - -EAPI Evas_Object * -evas_object_line_add(Evas *e) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_line_init(obj); - evas_object_inject(obj, e); - return obj; -} - -EAPI void -evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2) -{ - Evas_Object_Line *o; - Evas_Coord min_x, max_x, min_y, max_y; - int is, was = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Line *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); - return; - MAGIC_CHECK_END(); - if ((x1 == o->cur.x1) && (y1 == o->cur.y1) && - (x2 == o->cur.x2) && (y2 == o->cur.y2)) return; - if (obj->layer->evas->events_frozen <= 0) - { - if (!evas_event_passes_through(obj) && - !evas_event_freezes_through(obj)) - was = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, - 1, 1); - } - if (x1 < x2) - { - min_x = x1; - max_x = x2; - } - else - { - min_x = x2; - max_x = x1; - } - if (y1 < y2) - { - min_y = y1; - max_y = y2; - } - else - { - min_y = y2; - max_y = y1; - } - obj->cur.geometry.x = min_x; - obj->cur.geometry.y = min_y; - obj->cur.geometry.w = max_x - min_x + 2; - obj->cur.geometry.h = max_y - min_y + 2; -//// obj->cur.cache.geometry.validity = 0; - o->cur.x1 = x1 - min_x; - o->cur.y1 = y1 - min_y; - o->cur.x2 = x2 - min_x; - o->cur.y2 = y2 - min_y; - o->changed = 1; - evas_object_change(obj); - evas_object_coords_recalc(obj); - evas_object_clip_dirty(obj); - if (obj->layer->evas->events_frozen <= 0) - { - is = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); - if (!evas_event_passes_through(obj) && - !evas_event_freezes_through(obj)) - { - 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); -} - -EAPI void -evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2) -{ - Evas_Object_Line *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (x1) *x1 = 0; - if (y1) *y1 = 0; - if (x2) *x2 = 0; - if (y2) *y2 = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Line *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); - if (x1) *x1 = 0; - if (y1) *y1 = 0; - if (x2) *x2 = 0; - if (y2) *y2 = 0; - return; - MAGIC_CHECK_END(); - if (x1) *x1 = obj->cur.geometry.x + o->cur.x1; - if (y1) *y1 = obj->cur.geometry.y + o->cur.y1; - if (x2) *x2 = obj->cur.geometry.x + o->cur.x2; - if (y2) *y2 = obj->cur.geometry.y + o->cur.y2; -} - -/* all nice and private */ -static void -evas_object_line_init(Evas_Object *obj) -{ - /* alloc image ob, setup methods and default values */ - obj->object_data = evas_object_line_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - obj->cur.anti_alias = 1; - obj->cur.render_op = EVAS_RENDER_BLEND; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; -} - -static void * -evas_object_line_new(void) -{ - Evas_Object_Line *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 16, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line); - o->magic = MAGIC_OBJ_LINE; - o->cur.x1 = 0; - o->cur.y1 = 0; - o->cur.x2 = 31; - o->cur.y2 = 31; - o->prev = o->cur; - return o; -} - -static void -evas_object_line_free(Evas_Object *obj) -{ - Evas_Object_Line *o; - - /* frees private object data. very simple here */ - o = (Evas_Object_Line *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); - return; - MAGIC_CHECK_END(); - /* free obj */ - o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -static void -evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) -{ - Evas_Object_Line *o; - - /* render object to surface with context, and offxet by x,y */ - o = (Evas_Object_Line *)(obj->object_data); - obj->layer->evas->engine.func->context_color_set(output, - context, - obj->cur.cache.clip.r, - obj->cur.cache.clip.g, - obj->cur.cache.clip.b, - obj->cur.cache.clip.a); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_anti_alias_set(output, context, - obj->cur.anti_alias); - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur.render_op); - obj->layer->evas->engine.func->line_draw(output, - context, - surface, - o->cur.cache.x1 + x, - o->cur.cache.y1 + y, - o->cur.cache.x2 + x, - o->cur.cache.y2 + y); -} - -static void -evas_object_line_render_pre(Evas_Object *obj) -{ - Evas_Object_Line *o; - int is_v, was_v; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before */ - /* rendering. this could mean loading the image data, retrieving it from */ - /* elsewhere, decoding video etc. */ - /* then when this is done the object needs to figure if it changed and */ - /* if so what and where and add the appropriate redraw lines */ - o = (Evas_Object_Line *)(obj->object_data); - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); - goto done; - } - 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); - goto done; - } - /* it's not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); - /* if we restacked (layer or just within a layer) */ - if (obj->restack) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed anti_alias */ - if (obj->cur.anti_alias != obj->prev.anti_alias) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed render op */ - if (obj->cur.render_op != obj->prev.render_op) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed geometry - and obviously not visibility or color */ - /* calculate differences since we have a constant color fill */ - /* we really only need to update the differences */ - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h) || - ((o->changed) && - ((o->cur.x1 != o->prev.x1) || - (o->cur.y1 != o->prev.y1) || - (o->cur.x2 != o->prev.x2) || - (o->cur.y2 != o->prev.y2))) - ) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - done: - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); -} - -static void -evas_object_line_render_post(Evas_Object *obj) -{ - Evas_Object_Line *o; - - /* this moves the current data to the previous state parts of the object */ - /* in whatever way is safest for the object. also if we don't need object */ - /* data anymore we can free it if the object deems this is a good idea */ - o = (Evas_Object_Line *)(obj->object_data); - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; - o->prev = o->cur; - o->changed = 0; -} - -static unsigned int evas_object_line_id_get(Evas_Object *obj) -{ - Evas_Object_Line *o; - - o = (Evas_Object_Line *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_LINE; -} - -static unsigned int evas_object_line_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Line *o; - - o = (Evas_Object_Line *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - -static void *evas_object_line_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Line *o; - - o = (Evas_Object_Line *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} - -static int -evas_object_line_is_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object is */ - /* currently fully opaque over the entire line it occupies */ - return 0; -} - -static int -evas_object_line_was_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object was */ - /* previously fully opaque over the entire line it occupies */ - return 0; -} - -static int -evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) -{ - /* this returns 1 if the canvas co-ordinates are inside the object based */ - /* on object private data. not much use for rects, but for polys, images */ - /* and other complex objects it might be */ - return 1; -} - -static int -evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) -{ - /* this returns 1 if the canvas co-ordinates were inside the object based */ - /* on object private data. not much use for rects, but for polys, images */ - /* and other complex objects it might be */ - return 1; -} - -static void -evas_object_line_coords_recalc(Evas_Object *obj) -{ - Evas_Object_Line *o; - - o = (Evas_Object_Line *)(obj->object_data); - o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1; - o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1; - o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2; - o->cur.cache.y2 = obj->cur.geometry.y + o->cur.y2; - o->cur.cache.object.w = obj->cur.geometry.w; - o->cur.cache.object.h = obj->cur.geometry.h; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_main.c b/libraries/evas/src/lib/canvas/evas_object_main.c deleted file mode 100644 index 81fc858..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_main.c +++ /dev/null @@ -1,1398 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -EVAS_MEMPOOL(_mp_obj); -EVAS_MEMPOOL(_mp_sh); - -static Eina_Inlist * -get_layer_objects(Evas_Layer *l) -{ - if ((!l) || (!l->objects)) return NULL; - return (EINA_INLIST_GET(l->objects)); -} - -/* evas internal stuff */ -Evas_Object * -evas_object_new(Evas *e __UNUSED__) -{ - Evas_Object *obj; - - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 512, NULL); - 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; - obj->is_frame = EINA_FALSE; - - return obj; -} - -void -evas_object_free(Evas_Object *obj, int clean_layer) -{ - int was_smart_child = 0; - -#if 0 // filtering disabled - evas_filter_free(obj); -#endif - if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(obj, NULL); - evas_object_map_set(obj, NULL); - evas_object_grabs_cleanup(obj); - evas_object_intercept_cleanup(obj); - if (obj->smart.parent) was_smart_child = 1; - evas_object_smart_cleanup(obj); - obj->func->free(obj); - if (!was_smart_child) evas_object_release(obj, clean_layer); - if (obj->clip.clipees) - eina_list_free(obj->clip.clipees); - evas_object_clip_changes_clean(obj); - evas_object_event_callback_all_del(obj); - evas_object_event_callback_cleanup(obj); - while (obj->data.elements) - { - Evas_Data_Node *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) - { - EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints); - } - EVAS_MEMPOOL_FREE(_mp_obj, obj); -} - -void -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); - return; - } -// else -// printf("ch %p\n", obj); - obj->layer->evas->changed = 1; - if (obj->changed_move) - { - movch = 1; - obj->changed_move = 0; - if (!obj->changed_nomove) obj->changed_move_only = 1; - if (obj->changed) return; - } - else - { - obj->changed_move_only = 0; - obj->changed_nomove = 1; - if (obj->changed) return; - } -// obj->changed = 1; - evas_render_object_recalc(obj); - /* set changed flag on all objects this one clips too */ - if (!((movch) && (obj->is_static_clip))) - { - EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) - evas_object_change(obj2); - } - EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2) - { - evas_object_change(obj2); - } - if (obj->smart.parent) evas_object_change(obj->smart.parent); -} - -void -evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) -{ - if (obj->smart.smart) return; - if (is_v == was_v) return; - if (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); - } - 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); - } -} - -void -evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj) -{ - if (obj->smart.smart) return; - if (obj->cur.clipper == obj->prev.clipper) return; - if ((obj->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); - } - 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, -//// 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); - } - 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, -//// 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); - } -} - -void -evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj) -{ - 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->prev.cache.clip.x, - obj->prev.cache.clip.y, - obj->prev.cache.clip.w, - obj->prev.cache.clip.h); -/* - evas_add_rect(rects, - obj->cur.geometry.x, - obj->cur.geometry.y, - obj->cur.geometry.w, - obj->cur.geometry.h); -//// obj->cur.cache.geometry.x, -//// obj->cur.cache.geometry.y, -//// obj->cur.cache.geometry.w, -//// obj->cur.cache.geometry.h); - evas_add_rect(rects, - obj->prev.geometry.x, - obj->prev.geometry.y, - obj->prev.geometry.w, - obj->prev.geometry.h); -//// obj->prev.cache.geometry.x, -//// obj->prev.cache.geometry.y, -//// obj->prev.cache.geometry.w, -//// obj->prev.cache.geometry.h); -*/ -} - -void -evas_object_clip_changes_clean(Evas_Object *obj) -{ - Eina_Rectangle *r; - - EINA_LIST_FREE(obj->clip.changes, r) - eina_rectangle_free(r); -} - -void -evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__) -{ - Eina_Rectangle *r; - Evas_Object *clipper; - Eina_List *l; - unsigned int i; - Eina_Array_Iterator it; - int x, y, w, h; - - if (obj->smart.smart) goto end; - /* FIXME: was_v isn't used... why? */ - 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; - } - } - } - 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); - } - - end: - EINA_ARRAY_ITER_NEXT(rects, i, r, it) - eina_rectangle_free(r); - eina_array_clean(rects); -} - -int -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))) - return 1; - return 0; -} - -int -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; - } - return 0; -} - -int -evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - if (obj->smart.smart) return 0; - if (obj->func->is_inside) - return obj->func->is_inside(obj, x, y); - return 0; -} - -int -evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - if (obj->smart.smart) return 0; - if (obj->func->was_inside) - return obj->func->was_inside(obj, x, y); - return 0; -} -/* routines apps will call */ - -EAPI void -evas_object_ref(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->ref++; - if (obj->ref == 0) obj->ref--; -} - -EAPI void -evas_object_unref(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->ref == 0) return; - obj->ref--; - if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj); -} - -EAPI void -evas_object_del(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (obj->delete_me) return; - - if (obj->ref > 0) - { - obj->del_ref = 1; - return; - } -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_flush(); -#endif - - 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, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); - } - _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); - if (obj->mouse_grabbed > 0) - 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); - obj->mouse_grabbed = 0; - obj->mouse_in = 0; - if (obj->name) evas_object_name_set(obj, NULL); - if (!obj->layer) - { - evas_object_free(obj, 1); - return; - } - evas_object_grabs_cleanup(obj); - 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); - if (obj->cur.clipper) evas_object_clip_unset(obj); - if (obj->smart.smart) evas_object_smart_del(obj); - evas_object_map_set(obj, NULL); - _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter); - _evas_post_event_callback_call(obj->layer->evas); - evas_object_smart_cleanup(obj); - obj->delete_me = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - int is, was = 0, pass = 0, freeze = 0; - int nx = 0, ny = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - - nx = x; - ny = y; - - if (!obj->is_frame) - { - int fx, fy; - - evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL); - if (!obj->smart.parent) - { - nx += fx; - ny += fy; - } - } - - if (evas_object_intercept_call_move(obj, nx, ny)) return; - - if (obj->doing.in_move > 0) - { - WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj); - return; - } - - if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return; - - if (obj->layer->evas->events_frozen <= 0) - { - pass = evas_event_passes_through(obj); - freeze = evas_event_freezes_through(obj); - if ((!pass) && (!freeze)) - 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, nx, ny); - } - - obj->cur.geometry.x = nx; - obj->cur.geometry.y = ny; - -//// obj->cur.cache.geometry.validity = 0; - obj->changed_move = 1; - evas_object_change(obj); - evas_object_clip_dirty(obj); - 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_inform_call_move(obj); -} - -EAPI void -evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) -{ - int is, was = 0, pass = 0, freeze =0; - int nw = 0, nh = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (w < 0) w = 0; if (h < 0) h = 0; - - nw = w; - nh = h; - if (!obj->is_frame) - { - int fw, fh; - - evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh); - if (!obj->smart.parent) - { - nw = w - fw; - nh = h - fh; - if (nw < 0) nw = 0; - if (nh < 0) nh = 0; - } - } - - if (evas_object_intercept_call_resize(obj, nw, nh)) return; - - if (obj->doing.in_resize > 0) - { - WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj); - return; - } - - if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return; - - if (obj->layer->evas->events_frozen <= 0) - { - pass = evas_event_passes_through(obj); - freeze = evas_event_freezes_through(obj); - if ((!pass) && (!freeze)) - 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, nw, nh); - } - - obj->cur.geometry.w = nw; - obj->cur.geometry.h = nh; - -//// obj->cur.cache.geometry.validity = 0; - evas_object_change(obj); - evas_object_clip_dirty(obj); - obj->doing.in_resize--; - /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */ - if (obj->layer->evas->events_frozen <= 0) - { - /* 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); - } - } - } - evas_object_inform_call_resize(obj); -} - -EAPI void -evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; - return; - 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 = obj->cur.geometry.x; - if (y) *y = obj->cur.geometry.y; - if (w) *w = obj->cur.geometry.w; - if (h) *h = obj->cur.geometry.h; -} - -static void -_evas_object_size_hint_alloc(Evas_Object *obj) -{ - if (obj->size_hints) return; - - EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 512, ); - obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints); - if (!obj->size_hints) return; - EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints); - obj->size_hints->max.w = -1; - obj->size_hints->max.h = -1; - obj->size_hints->align.x = 0.5; - obj->size_hints->align.y = 0.5; -} - -EAPI void -evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (w) *w = 0; if (h) *h = 0; - return; - MAGIC_CHECK_END(); - if ((!obj->size_hints) || obj->delete_me) - { - 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; -} - -EAPI void -evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return; - obj->size_hints->min.w = w; - obj->size_hints->min.h = h; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (w) *w = -1; if (h) *h = -1; - return; - MAGIC_CHECK_END(); - if ((!obj->size_hints) || obj->delete_me) - { - 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; -} - -EAPI void -evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return; - obj->size_hints->max.w = w; - obj->size_hints->max.h = h; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (w) *w = 0; if (h) *h = 0; - return; - MAGIC_CHECK_END(); - if ((!obj->size_hints) || obj->delete_me) - { - 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; -} - -EAPI void -evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return; - obj->size_hints->request.w = w; - obj->size_hints->request.h = h; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE; - if (w) *w = 0; if (h) *h = 0; - return; - 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 = obj->size_hints->aspect.mode; - if (w) *w = obj->size_hints->aspect.size.w; - if (h) *h = obj->size_hints->aspect.size.h; -} - -EAPI void -evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return; - obj->size_hints->aspect.mode = aspect; - obj->size_hints->aspect.size.w = w; - obj->size_hints->aspect.size.h = h; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (x) *x = 0.5; if (y) *y = 0.5; - return; - MAGIC_CHECK_END(); - if ((!obj->size_hints) || obj->delete_me) - { - 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; -} - -EAPI void -evas_object_size_hint_align_set(Evas_Object *obj, double x, double y) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return; - obj->size_hints->align.x = x; - obj->size_hints->align.y = y; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (x) *x = 0.0; if (y) *y = 0.0; - return; - MAGIC_CHECK_END(); - if ((!obj->size_hints) || obj->delete_me) - { - 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; -} - -EAPI void -evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return; - obj->size_hints->weight.x = x; - obj->size_hints->weight.y = y; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (l) *l = 0; if (r) *r = 0; - if (t) *t = 0; if (b) *b = 0; - return; - 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 = obj->size_hints->padding.l; - if (r) *r = obj->size_hints->padding.r; - if (t) *t = obj->size_hints->padding.t; - if (b) *b = obj->size_hints->padding.b; -} - -EAPI void -evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) - return; - _evas_object_size_hint_alloc(obj); - if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return; - obj->size_hints->padding.l = l; - obj->size_hints->padding.r = r; - obj->size_hints->padding.t = t; - obj->size_hints->padding.b = b; - - evas_object_inform_call_changed_size_hints(obj); -} - -EAPI void -evas_object_show(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (evas_object_intercept_call_show(obj)) return; - if (obj->smart.smart) - { - if (obj->smart.smart->smart_class->show) - obj->smart.smart->smart_class->show(obj); - } - if (obj->cur.visible) - { - return; - } - obj->cur.visible = 1; - evas_object_change(obj); - evas_object_clip_dirty(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)) && - (!evas_event_freezes_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); -} - -EAPI void -evas_object_hide(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (evas_object_intercept_call_hide(obj)) return; - if (obj->smart.smart) - { - if (obj->smart.smart->smart_class->hide) - obj->smart.smart->smart_class->hide(obj); - } - if (!obj->cur.visible) - { - return; - } - obj->cur.visible = 0; - evas_object_change(obj); - evas_object_clip_dirty(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)) && - (!evas_event_freezes_through(obj))) - { - if ((!obj->smart.smart) || - ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap))) - { - if (!obj->mouse_grabbed) - { - 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); - } -/* this is at odds to handling events when an obj is moved out of the mouse - * ore resized out or clipped out. if mouse is grabbed - regardless of - * visibility, mouse move events should keep happening and mouse up. - * for better or worse it's at least consistent. - if (obj->delete_me) return; - if (obj->mouse_grabbed > 0) - 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); - obj->mouse_grabbed = 0; - if (obj->layer->evas->events_frozen > 0) - { - obj->mouse_in = 0; - return; - } - if (obj->mouse_in) - { - Evas_Event_Mouse_Out ev; - - _evas_object_event_new(); - - obj->mouse_in = 0; - ev.buttons = obj->layer->evas->pointer.button; - ev.output.x = obj->layer->evas->pointer.x; - ev.output.y = obj->layer->evas->pointer.y; - ev.canvas.x = obj->layer->evas->pointer.x; - ev.canvas.y = obj->layer->evas->pointer.y; - 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; - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); - _evas_post_event_callback_call(obj->layer->evas); - } - */ - } - } - } - else - { -/* - if (obj->mouse_grabbed > 0) - 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); - obj->mouse_grabbed = 0; - obj->mouse_in = 0; - */ - } - evas_object_inform_call_hide(obj); -} - -EAPI Eina_Bool -evas_object_visible_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - if (obj->delete_me) return 0; - return obj->cur.visible; -} - -EAPI void -evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (r > 255) r = 255; if (r < 0) r = 0; - if (g > 255) g = 255; if (g < 0) g = 0; - if (b > 255) b = 255; if (b < 0) b = 0; - if (a > 255) a = 255; if (a < 0) a = 0; - if (r > a) - { - r = a; - ERR("Evas only handle pre multiplied color !"); - } - if (g > a) - { - g = a; - ERR("Evas only handle pre multiplied color !"); - } - if (b > a) - { - b = a; - ERR("Evas only handle pre multiplied color !"); - } - - if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; - if (obj->smart.smart) - { - if (obj->smart.smart->smart_class->color_set) - obj->smart.smart->smart_class->color_set(obj, r, g, b, a); - } - if ((obj->cur.color.r == r) && - (obj->cur.color.g == g) && - (obj->cur.color.b == b) && - (obj->cur.color.a == a)) return; - obj->cur.color.r = r; - obj->cur.color.g = g; - obj->cur.color.b = b; - evas_object_clip_dirty(obj); - if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return; - obj->cur.color.a = a; - evas_object_change(obj); -} - -EAPI void -evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; - return; - 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 = obj->cur.color.r; - if (g) *g = obj->cur.color.g; - if (b) *b = obj->cur.color.b; - if (a) *a = obj->cur.color.a; -} - -EAPI void -evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - anti_alias = !!anti_alias; - if (obj->cur.anti_alias == anti_alias)return; - obj->cur.anti_alias = anti_alias; - evas_object_change(obj); -} - -EAPI Eina_Bool -evas_object_anti_alias_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - if (obj->delete_me) return 0; - return obj->cur.anti_alias; -} - -EAPI void -evas_object_scale_set(Evas_Object *obj, double scale) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (obj->cur.scale == scale) return; - obj->cur.scale = scale; - evas_object_change(obj); - if (obj->func->scale_update) obj->func->scale_update(obj); -} - -EAPI double -evas_object_scale_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - if (obj->delete_me) return 1.0; - return obj->cur.scale; -} - -EAPI void -evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->delete_me) return; - if (obj->cur.render_op == render_op) return; - obj->cur.render_op = render_op; - evas_object_change(obj); -} - -EAPI Evas_Render_Op -evas_object_render_op_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - if (obj->delete_me) return EVAS_RENDER_BLEND; - return obj->cur.render_op; -} - -EAPI Evas * -evas_object_evas_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (obj->delete_me) return NULL; - return obj->layer->evas; -} - -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) -{ - Evas_Layer *lay; - int xx, yy; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - xx = x; - yy = y; -//// xx = evas_coord_world_x_to_screen(e, x); -//// 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; - } - } - return NULL; -} - -EAPI Evas_Object * -evas_object_top_at_pointer_get(const Evas *e) -{ - return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, EINA_TRUE, - EINA_TRUE); -} - -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) -{ - Evas_Layer *lay; - int xx, yy, ww, hh; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - xx = x; - yy = y; - ww = w; - hh = h; -//// xx = evas_coord_world_x_to_screen(e, x); -//// yy = evas_coord_world_y_to_screen(e, y); -//// ww = evas_coord_world_x_to_screen(e, w); -//// hh = evas_coord_world_y_to_screen(e, h); - if (ww < 1) ww = 1; - 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; - } - } - return NULL; -} - -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_List *in = NULL; - Evas_Layer *lay; - int xx, yy; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - xx = x; - yy = y; -//// xx = evas_coord_world_x_to_screen(e, x); -//// 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); - } - } - return in; -} - -/** - * Retrieves the objects 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 list of evas object in the rectangle region. - * - */ -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_List *in = NULL; - Evas_Layer *lay; - int xx, yy, ww, hh; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - xx = x; - yy = y; - ww = w; - hh = h; -//// xx = evas_coord_world_x_to_screen(e, x); -//// yy = evas_coord_world_y_to_screen(e, y); -//// ww = evas_coord_world_x_to_screen(e, w); -//// hh = evas_coord_world_y_to_screen(e, h); - if (ww < 1) ww = 1; - 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); - } - } - return in; -} - -EAPI const char * -evas_object_type_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (obj->delete_me) return ""; - return obj->type; -} - -EAPI void -evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->precise_is_inside = precise; -} - -EAPI Eina_Bool -evas_object_precise_is_inside_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - return obj->precise_is_inside; -} - -EAPI void -evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->is_static_clip = is_static_clip; -} - -EAPI Eina_Bool -evas_object_static_clip_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - return obj->is_static_clip; -} - -EAPI void -evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->is_frame = is_frame; -} - -EAPI Eina_Bool -evas_object_is_frame_object_get(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - return obj->is_frame; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_polygon.c b/libraries/evas/src/lib/canvas/evas_object_polygon.c deleted file mode 100644 index cbc1802..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_polygon.c +++ /dev/null @@ -1,554 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* private magic number for polygon objects */ -static const char o_type[] = "polygon"; - -/* private struct for line object internal data */ -typedef struct _Evas_Object_Polygon Evas_Object_Polygon; -typedef struct _Evas_Polygon_Point Evas_Polygon_Point; - -struct _Evas_Object_Polygon -{ - DATA32 magic; - Eina_List *points; - void *engine_data; - struct { - int x, y; - } offset; - Evas_Coord_Rectangle geometry; - char changed : 1; -}; - -struct _Evas_Polygon_Point -{ - Evas_Coord x, y; -}; - -/* private methods for polygon objects */ -static void evas_object_polygon_init(Evas_Object *obj); -static void *evas_object_polygon_new(void); -static void evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_polygon_free(Evas_Object *obj); -static void evas_object_polygon_render_pre(Evas_Object *obj); -static void evas_object_polygon_render_post(Evas_Object *obj); - -static unsigned int evas_object_polygon_id_get(Evas_Object *obj); -static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj); -static void *evas_object_polygon_engine_data_get(Evas_Object *obj); - -static int evas_object_polygon_is_opaque(Evas_Object *obj); -static int evas_object_polygon_was_opaque(Evas_Object *obj); -static int evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -static int evas_object_polygon_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_polygon_free, - evas_object_polygon_render, - evas_object_polygon_render_pre, - evas_object_polygon_render_post, - evas_object_polygon_id_get, - evas_object_polygon_visual_id_get, - evas_object_polygon_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_polygon_is_opaque, - evas_object_polygon_was_opaque, - evas_object_polygon_is_inside, - evas_object_polygon_was_inside, - NULL, - NULL, - NULL, - NULL, - NULL -}; - -/* the actual api call to add a rect */ -/* it has no other api calls as all properties are standard */ - -EVAS_MEMPOOL(_mp_obj); - -EAPI Evas_Object * -evas_object_polygon_add(Evas *e) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_polygon_init(obj); - evas_object_inject(obj, e); - return obj; -} - -EAPI void -evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - Evas_Object_Polygon *o; - Evas_Polygon_Point *p; - Evas_Coord min_x, max_x, min_y, max_y; - int is, was = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Polygon *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); - return; - MAGIC_CHECK_END(); - - if (obj->layer->evas->events_frozen <= 0) - { - if (!evas_event_passes_through(obj) && - !evas_event_freezes_through(obj)) - was = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, - 1, 1); - } - if (!o->points) - { - o->offset.x = obj->cur.geometry.x; - o->offset.y = obj->cur.geometry.y; - } - else - { - /* Update all points and take offset into account. */ - Eina_List *over; - - EINA_LIST_FOREACH(o->points, over, p) - { - p->x += o->offset.x; - p->y += o->offset.y; - } - } - - p = malloc(sizeof(Evas_Polygon_Point)); - if (!p) return; - p->x = x + o->offset.x; - p->y = y + o->offset.y; - - if (!o->points) - { - obj->cur.geometry.x = p->x; - obj->cur.geometry.y = p->y; - obj->cur.geometry.w = 2; - obj->cur.geometry.h = 2; - } - else - { - if (p->x < obj->cur.geometry.x) min_x = p->x; - else min_x = obj->cur.geometry.x; - if (p->x > (obj->cur.geometry.x + obj->cur.geometry.w - 2)) - max_x = p->x; - else max_x = obj->cur.geometry.x + obj->cur.geometry.w - 2; - if (p->y < obj->cur.geometry.y) min_y = p->y; - else min_y = obj->cur.geometry.y; - if (p->y > (obj->cur.geometry.y + obj->cur.geometry.h - 2)) - max_y = p->y; - else max_y = obj->cur.geometry.y + obj->cur.geometry.h - 2; - obj->cur.geometry.x = min_x; - obj->cur.geometry.y = min_y; - obj->cur.geometry.w = max_x - min_x + 2; - obj->cur.geometry.h = max_y - min_y + 2; - } - o->points = eina_list_append(o->points, p); - - o->geometry = obj->cur.geometry; - o->offset.x = 0; - o->offset.y = 0; - - //// obj->cur.cache.geometry.validity = 0; - o->changed = EINA_TRUE; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_coords_recalc(obj); - if (obj->layer->evas->events_frozen <= 0) - { - is = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); - if (!evas_event_passes_through(obj) && - !evas_event_freezes_through(obj) ) - { - 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); -} - -EAPI void -evas_object_polygon_points_clear(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - int is, was; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Polygon *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); - return; - MAGIC_CHECK_END(); - was = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); - while (o->points) - { - free(o->points->data); - o->points = eina_list_remove(o->points, o->points->data); - } - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - //// obj->cur.cache.geometry.validity = 0; - o->changed = EINA_TRUE; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_coords_recalc(obj); - 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); -} - -/* all nice and private */ -static void -evas_object_polygon_init(Evas_Object *obj) -{ - /* alloc image ob, setup methods and default values */ - obj->object_data = evas_object_polygon_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; -} - -static void * -evas_object_polygon_new(void) -{ - Evas_Object_Polygon *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 32, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Polygon); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Polygon); - o->magic = MAGIC_OBJ_POLYGON; - return o; -} - -static void -evas_object_polygon_free(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - - /* frees private object data. very simple here */ - o = (Evas_Object_Polygon *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON); - return; - MAGIC_CHECK_END(); - /* free obj */ - while (o->points) - { - free(o->points->data); - o->points = eina_list_remove(o->points, o->points->data); - } - o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output, - obj->layer->evas->engine.data.context, - o->engine_data); - o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -static void -evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) -{ - Evas_Object_Polygon *o; - Eina_List *l; - Evas_Polygon_Point *p; - - /* render object to surface with context, and offxet by x,y */ - o = (Evas_Object_Polygon *)(obj->object_data); - obj->layer->evas->engine.func->context_color_set(output, - context, - obj->cur.cache.clip.r, - obj->cur.cache.clip.g, - obj->cur.cache.clip.b, - obj->cur.cache.clip.a); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur.render_op); - if (o->changed) - { - o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output, - obj->layer->evas->engine.data.context, - o->engine_data); - EINA_LIST_FOREACH(o->points, l, p) - { - //px = evas_coord_world_x_to_screen(obj->layer->evas, p->x); - //py = evas_coord_world_y_to_screen(obj->layer->evas, p->y); - o->engine_data = obj->layer->evas->engine.func->polygon_point_add(obj->layer->evas->engine.data.output, - obj->layer->evas->engine.data.context, - o->engine_data, - p->x, p->y); - } - } - - if (o->engine_data) - obj->layer->evas->engine.func->polygon_draw(output, - context, - surface, - o->engine_data, - o->offset.x + x, o->offset.y + y); -} - -static void -evas_object_polygon_render_pre(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - int is_v, was_v; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before */ - /* rendering. this could mean loading the image data, retrieving it from */ - /* elsewhere, decoding video etc. */ - /* then when this is done the object needs to figure if it changed and */ - /* if so what and where and add the appropriate redraw lines */ - o = (Evas_Object_Polygon *)(obj->object_data); - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); - goto done; - } - 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); - goto done; - } - /* it's not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); - /* if we restacked (layer or just within a layer) */ - if (obj->restack) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed render op */ - if (obj->cur.render_op != obj->prev.render_op) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed geometry - and obviously not visibility or color */ - /* calculate differences since we have a constant color fill */ - /* we really only need to update the differences */ - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h) || - (o->changed)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - done: - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y)) - { - if (!o->changed) - { - o->offset.x += obj->cur.geometry.x - obj->prev.geometry.x; - o->offset.y += obj->cur.geometry.y - obj->prev.geometry.y; - } - else - { - o->offset.x += obj->cur.geometry.x - o->geometry.x; - o->offset.y += obj->cur.geometry.y - o->geometry.y; - } - } - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); -} - -static void -evas_object_polygon_render_post(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - - /* this moves the current data to the previous state parts of the object */ - /* in whatever way is safest for the object. also if we don't need object */ - /* data anymore we can free it if the object deems this is a good idea */ - o = (Evas_Object_Polygon *)(obj->object_data); - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; - o->changed = 0; -} - -static unsigned int evas_object_polygon_id_get(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - - o = (Evas_Object_Polygon *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_POLYGON; -} - -static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - - o = (Evas_Object_Polygon *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - -static void *evas_object_polygon_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Polygon *o; - - o = (Evas_Object_Polygon *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} - -static int -evas_object_polygon_is_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object is */ - /* currently fully opaque over the entire line it occupies */ - return 0; -} - -static int -evas_object_polygon_was_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object was */ - /* previously fully opaque over the entire line it occupies */ - return 0; -} - -/* We count the number of edges a "ray" 90 degs upwards from our point - * intersects with. If it's even, we are outside of the polygon, if it's odd, - * we are inside of it. */ -static int -evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - Evas_Object_Polygon *o; - int num_edges = 0; /* Number of edges we crossed */ - Eina_List *itr; - Evas_Polygon_Point *p; - - o = (Evas_Object_Polygon *)(obj->object_data); - if (!o) return 0; - if (!o->points) return 0; - - /* Adjust X and Y according to current geometry */ - x -= o->offset.x; - y -= o->offset.y; - - if (eina_list_count(o->points) == 1) - { - p = eina_list_data_get(o->points); - return ((p->x == x) && (p->y == y)); - } - - EINA_LIST_FOREACH(o->points, itr, p) - { - Evas_Coord line_y; - Eina_List *next = eina_list_next(itr); - Evas_Polygon_Point *p_next; - /* Get the next, or if there's no next, take the first */ - if (next) - { - p_next = eina_list_data_get(next); - } - else - { - p_next = eina_list_data_get(o->points); - } - - /* Make sure that we are directly below the edge, - * and that p->x != p_next->x */ - if (((p->x < p_next->x) && (p->x <= x) && (x < p_next->x)) || - ((p->x > p_next->x) && (p_next->x < x) && (x <= p->x))) - { - line_y = ((double) (p->y - p_next->y) / - (double) (p->x - p_next->x)) * - (x - p_next->x) + p_next->y; - /* We crossed that edge if the line is directly above us */ - if (line_y < y) - num_edges++; - } - } - - /* Return true if num_edges is odd */ - return ((num_edges % 2) == 1); -} - -static int -evas_object_polygon_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) -{ - /* this returns 1 if the canvas co-ordinates were inside the object based */ - /* on object private data. not much use for rects, but for polys, images */ - /* and other complex objects it might be */ - return 1; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_rectangle.c b/libraries/evas/src/lib/canvas/evas_object_rectangle.c deleted file mode 100644 index 36678e7..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_rectangle.c +++ /dev/null @@ -1,387 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -/* 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; - -struct _Evas_Object_Rectangle -{ - DATA32 magic; - void *engine_data; -}; - -/* private methods for rectangle objects */ -static void evas_object_rectangle_init(Evas_Object *obj); -static void *evas_object_rectangle_new(void); -static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_rectangle_free(Evas_Object *obj); -static void evas_object_rectangle_render_pre(Evas_Object *obj); -static void evas_object_rectangle_render_post(Evas_Object *obj); - -static unsigned int evas_object_rectangle_id_get(Evas_Object *obj); -static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj); -static void *evas_object_rectangle_engine_data_get(Evas_Object *obj); - -static int evas_object_rectangle_is_opaque(Evas_Object *obj); -static int evas_object_rectangle_was_opaque(Evas_Object *obj); - -#if 0 /* usless calls for a rect object. much more useful for images etc. */ -static void evas_object_rectangle_store(Evas_Object *obj); -static void evas_object_rectangle_unstore(Evas_Object *obj); -static int evas_object_rectangle_is_visible(Evas_Object *obj); -static int evas_object_rectangle_was_visible(Evas_Object *obj); -static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y); -static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y); -#endif - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_rectangle_free, - evas_object_rectangle_render, - evas_object_rectangle_render_pre, - evas_object_rectangle_render_post, - evas_object_rectangle_id_get, - evas_object_rectangle_visual_id_get, - evas_object_rectangle_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_rectangle_is_opaque, - evas_object_rectangle_was_opaque, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -}; - -/* the actual api call to add a rect */ -/* it has no other api calls as all properties are standard */ - -EVAS_MEMPOOL(_mp_obj); - -EAPI Evas_Object * -evas_object_rectangle_add(Evas *e) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_rectangle_init(obj); - evas_object_inject(obj, e); - return obj; -} - -/* all nice and private */ -static void -evas_object_rectangle_init(Evas_Object *obj) -{ - /* alloc image ob, setup methods and default values */ - obj->object_data = evas_object_rectangle_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - obj->cur.render_op = EVAS_RENDER_BLEND; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; -} - -static void * -evas_object_rectangle_new(void) -{ - Evas_Object_Rectangle *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 256, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle); - o->magic = MAGIC_OBJ_RECTANGLE; - return o; -} - -static void -evas_object_rectangle_free(Evas_Object *obj) -{ - Evas_Object_Rectangle *o; - - /* frees private object data. very simple here */ - o = (Evas_Object_Rectangle *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Rectangle, MAGIC_OBJ_RECTANGLE); - return; - MAGIC_CHECK_END(); - /* free obj */ - o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -static void -evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) -{ - /* render object to surface with context, and offxet by x,y */ - obj->layer->evas->engine.func->context_color_set(output, - context, - obj->cur.cache.clip.r, - obj->cur.cache.clip.g, - obj->cur.cache.clip.b, - obj->cur.cache.clip.a); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - obj->layer->evas->engine.func->context_render_op_set(output, context, - obj->cur.render_op); - obj->layer->evas->engine.func->rectangle_draw(output, - context, - surface, - obj->cur.geometry.x + x, - obj->cur.geometry.y + y, - obj->cur.geometry.w, - obj->cur.geometry.h); -//// obj->cur.cache.geometry.x + x, -//// obj->cur.cache.geometry.y + y, -//// obj->cur.cache.geometry.w, -//// obj->cur.cache.geometry.h); -} - -static void -evas_object_rectangle_render_pre(Evas_Object *obj) -{ - int is_v, was_v; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before */ - /* rendering. this could mean loading the image data, retrieving it from */ - /* elsewhere, decoding video etc. */ - /* then when this is done the object needs to figure if it changed and */ - /* if so what and where and add the appropriate redraw rectangles */ - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (!(is_v | was_v)) goto done; - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); - goto done; - } - 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); - goto done; - } - /* it's not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); - /* if we restacked (layer or just within a layer) and don't clip anyone */ - if ((obj->restack) && (!obj->clip.clipees)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed render op */ - if (obj->cur.render_op != obj->prev.render_op) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed geometry - and obviously not visibility or color */ - /* calculate differences since we have a constant color fill */ - /* we really only need to update the differences */ - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h)) - { - evas_rects_return_difference_rects(&obj->layer->evas->clip_changes, - obj->cur.geometry.x, - obj->cur.geometry.y, - obj->cur.geometry.w, - obj->cur.geometry.h, - obj->prev.geometry.x, - obj->prev.geometry.y, - obj->prev.geometry.w, - obj->prev.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->prev.cache.geometry.x, -//// obj->prev.cache.geometry.y, -//// obj->prev.cache.geometry.w, -//// obj->prev.cache.geometry.h); - goto done; - } - /* 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 */ - /* arent fully opaque and we are visible */ - /* - if (evas_object_is_visible(obj) && - evas_object_is_opaque(obj) && - (!obj->clip.clipees)) - obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output, - obj->cur.cache.clip.x, - obj->cur.cache.clip.y, - obj->cur.cache.clip.w, - obj->cur.cache.clip.h); - */ - done: - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); -} - -static void -evas_object_rectangle_render_post(Evas_Object *obj) -{ - - /* this moves the current data to the previous state parts of the object */ - /* in whatever way is safest for the object. also if we don't need object */ - /* data anymore we can free it if the object deems this is a good idea */ - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; -} - -static int -evas_object_rectangle_is_opaque(Evas_Object *obj) -{ - /* this returns 1 if the internal object data implies that the object is */ - /* currently fully opaque over the entire rectangle it occupies */ - if ((obj->cur.map) && (obj->cur.usemap)) return 0; - if (obj->cur.render_op == EVAS_RENDER_COPY) - return 1; - if (obj->cur.render_op != EVAS_RENDER_BLEND) - return 0; - return 1; -} - -static int -evas_object_rectangle_was_opaque(Evas_Object *obj) -{ - /* this returns 1 if the internal object data implies that the object was */ - /* previously fully opaque over the entire rectangle it occupies */ - if (obj->prev.render_op == EVAS_RENDER_COPY) - return 1; - if (obj->prev.render_op != EVAS_RENDER_BLEND) - return 0; - return 1; -} - -static unsigned int evas_object_rectangle_id_get(Evas_Object *obj) -{ - Evas_Object_Rectangle *o; - - o = (Evas_Object_Rectangle *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_RECTANGLE; -} - -static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Rectangle *o; - - o = (Evas_Object_Rectangle *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - -static void *evas_object_rectangle_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Rectangle *o; - - o = (Evas_Object_Rectangle *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} - - -#if 0 /* usless calls for a rect object. much more useful for images etc. */ -static void -evas_object_rectangle_store(Evas_Object *obj) -{ - /* store... nothing for rectangle objects... it's a bit silly */ - /* but for others that may have expensive caluclations to do to */ - /* generate the object data, hint that they might want to be pre-calced */ - /* once and stored */ -} - -static void -evas_object_rectangle_unstore(Evas_Object *obj) -{ - /* store... nothing for rectangle objects... it's a bit silly */ -} - -static int -evas_object_rectangle_is_visible(Evas_Object *obj) -{ - /* this returns 1 if the internal object data would imply that it is */ - /* visible (ie drawing it draws something. this is not to do with events */ - return 1; -} - -static int -evas_object_rectangle_was_visible(Evas_Object *obj) -{ - /* this returns 1 if the internal object data would imply that it was */ - /* visible (ie drawing it draws something. this is not to do with events */ - return 1; -} - -static int -evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y) -{ - /* this returns 1 if the canvas co-ordinates are inside the object based */ - /* on object private data. not much use for rects, but for polys, images */ - /* and other complex objects it might be */ - return 1; -} - -static int -evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y) -{ - /* this returns 1 if the canvas co-ordinates were inside the object based */ - /* on object private data. not much use for rects, but for polys, images */ - /* and other complex objects it might be */ - return 1; -} -#endif diff --git a/libraries/evas/src/lib/canvas/evas_object_smart.c b/libraries/evas/src/lib/canvas/evas_object_smart.c deleted file mode 100644 index 69d7f3b..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_smart.c +++ /dev/null @@ -1,951 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -typedef struct _Evas_Object_Smart Evas_Object_Smart; -typedef struct _Evas_Smart_Callback Evas_Smart_Callback; - -struct _Evas_Object_Smart -{ - DATA32 magic; - void *engine_data; - void *data; - Eina_List *callbacks; - Eina_Inlist *contained; - Evas_Smart_Cb_Description_Array callbacks_descriptions; - int walking_list; - Eina_Bool deletions_waiting : 1; - Eina_Bool need_recalculate : 1; -}; - -struct _Evas_Smart_Callback -{ - const char *event; - Evas_Smart_Cb func; - void *func_data; - Evas_Callback_Priority priority; - char delete_me : 1; -}; - -/* private methods for smart objects */ -static void evas_object_smart_callbacks_clear(Evas_Object *obj); -static void evas_object_smart_init(Evas_Object *obj); -static void *evas_object_smart_new(void); -static void evas_object_smart_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_smart_free(Evas_Object *obj); -static void evas_object_smart_render_pre(Evas_Object *obj); -static void evas_object_smart_render_post(Evas_Object *obj); - -static unsigned int evas_object_smart_id_get(Evas_Object *obj); -static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj); -static void *evas_object_smart_engine_data_get(Evas_Object *obj); - -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_MEMPOOL(_mp_obj); -EVAS_MEMPOOL(_mp_cb); - -/* public funcs */ -EAPI void -evas_object_smart_data_set(Evas_Object *obj, void *data) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - o->data = data; -} - -EAPI void * -evas_object_smart_data_get(const Evas_Object *obj) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - if (!o) return NULL; - return o->data; -} - -EAPI Evas_Smart * -evas_object_smart_smart_get(const Evas_Object *obj) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return NULL; - MAGIC_CHECK_END(); - return obj->smart.smart; -} - -EAPI void -evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - MAGIC_CHECK(smart_obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(smart_obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - - if (obj->delete_me) - { - CRIT("Adding deleted object %p to smart obj %p", obj, smart_obj); - abort(); - return; - } - if (smart_obj->delete_me) - { - 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; - } - 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; - } - - if (obj->smart.parent == smart_obj) return; - - if (obj->smart.parent) evas_object_smart_member_del(obj); - - evas_object_release(obj, 1); - obj->layer = smart_obj->layer; - obj->cur.layer = obj->layer->layer; - obj->layer->usage++; - obj->smart.parent = smart_obj; - o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); - evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE); - obj->restack = 1; - evas_object_change(obj); - evas_object_mapped_clip_across_mark(obj); - if (smart_obj->smart.smart->smart_class->member_add) - smart_obj->smart.smart->smart_class->member_add(smart_obj, obj); -} - -EAPI void -evas_object_smart_member_del(Evas_Object *obj) -{ - Evas_Object_Smart *o; - Evas_Object *smart_obj; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (!obj->smart.parent) return; - - smart_obj = obj->smart.parent; - if (smart_obj->smart.smart->smart_class->member_del) - smart_obj->smart.smart->smart_class->member_del(smart_obj, obj); - - o = (Evas_Object_Smart *)(obj->smart.parent->object_data); - o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); - obj->smart.parent = NULL; - evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE); - obj->layer->usage--; - obj->cur.layer = obj->layer->layer; - evas_object_inject(obj, obj->layer->evas); - obj->restack = 1; - evas_object_change(obj); - evas_object_mapped_clip_across_mark(obj); -} - -EAPI Evas_Object * -evas_object_smart_parent_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - - return obj->smart.parent; -} - -EAPI Eina_Bool -evas_object_smart_type_check(const Evas_Object *obj, const char *type) -{ - const Evas_Smart_Class *sc; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - - if (!obj->smart.smart) - return EINA_FALSE; - sc = obj->smart.smart->smart_class; - while (sc) - { - if (!strcmp(sc->name, type)) - return EINA_TRUE; - sc = sc->parent; - } - - return EINA_FALSE; -} - -EAPI Eina_Bool -evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type) -{ - const Evas_Smart_Class *sc; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - - if (!obj->smart.smart) - return EINA_FALSE; - sc = obj->smart.smart->smart_class; - while (sc) - { - if (sc->name == type) - return EINA_TRUE; - sc = sc->parent; - } - - return EINA_FALSE; -} - -EAPI Eina_List * -evas_object_smart_members_get(const Evas_Object *obj) -{ - Evas_Object_Smart *o; - Eina_List *members; - Eina_Inlist *member; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return NULL; - MAGIC_CHECK_END(); - - members = NULL; - for (member = o->contained; member; member = member->next) - members = eina_list_append(members, member); - - return members; -} - -const Eina_Inlist * -evas_object_smart_members_get_direct(const Evas_Object *obj) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return NULL; - MAGIC_CHECK_END(); - return o->contained; -} - -void -_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)); -} - -EAPI Evas_Object * -evas_object_smart_add(Evas *e, Evas_Smart *s) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - return NULL; - MAGIC_CHECK_END(); - - obj = evas_object_new(e); - if (!obj) return NULL; - obj->smart.smart = s; - obj->type = s->smart_class->name; - evas_object_smart_init(obj); - evas_object_inject(obj, e); - - evas_object_smart_use(s); - - if (s->smart_class->add) s->smart_class->add(obj); - - return obj; -} - -static int -_callback_priority_cmp(const void *_a, const void *_b) -{ - const Evas_Smart_Callback *a, *b; - a = (const Evas_Smart_Callback *) _a; - b = (const Evas_Smart_Callback *) _b; - if (a->priority < b->priority) - return -1; - else - return 1; -} - -EAPI void -evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) -{ - evas_object_smart_callback_priority_add(obj, event, - EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); -} - -EAPI void -evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data) -{ - Evas_Object_Smart *o; - Evas_Smart_Callback *cb; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - if (!event) return; - if (!func) return; - EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 512, ); - cb = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Smart_Callback); - if (!cb) return; - EVAS_MEMPOOL_PREP(_mp_cb, cb, Evas_Smart_Callback); - cb->event = eina_stringshare_add(event); - cb->func = func; - cb->func_data = (void *)data; - cb->priority = priority; - o->callbacks = eina_list_sorted_insert(o->callbacks, _callback_priority_cmp, - cb); -} - -EAPI void * -evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func) -{ - Evas_Object_Smart *o; - Eina_List *l; - Evas_Smart_Callback *cb; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return NULL; - MAGIC_CHECK_END(); - if (!event) return NULL; - EINA_LIST_FOREACH(o->callbacks, l, cb) - { - if ((!strcmp(cb->event, event)) && (cb->func == func)) - { - void *data; - - data = cb->func_data; - cb->delete_me = 1; - o->deletions_waiting = 1; - evas_object_smart_callbacks_clear(obj); - return data; - } - } - return NULL; -} - -EAPI void * -evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) -{ - Evas_Object_Smart *o; - Eina_List *l; - Evas_Smart_Callback *cb; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return NULL; - MAGIC_CHECK_END(); - if (!event) return NULL; - EINA_LIST_FOREACH(o->callbacks, l, cb) - { - if ((!strcmp(cb->event, event)) && (cb->func == func) && (cb->func_data == data)) - { - void *ret; - - ret = cb->func_data; - cb->delete_me = 1; - o->deletions_waiting = 1; - evas_object_smart_callbacks_clear(obj); - return ret; - } - } - return NULL; -} - -EAPI void -evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) -{ - Evas_Object_Smart *o; - Eina_List *l; - Evas_Smart_Callback *cb; - const char *strshare; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - if (!event) return; - if (obj->delete_me) return; - o->walking_list++; - 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; - } - eina_stringshare_del(strshare); - o->walking_list--; - evas_object_smart_callbacks_clear(obj); -} - -EAPI Eina_Bool -evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) -{ - const Evas_Smart_Cb_Description *d; - Evas_Object_Smart *o; - unsigned int i, count = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return EINA_FALSE; - MAGIC_CHECK_END(); - - if ((!descriptions) || (!descriptions->name)) - { - evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0); - return EINA_TRUE; - } - - for (count = 0, d = descriptions; d->name; d++) - count++; - - evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count); - if (count == 0) return EINA_TRUE; - - for (i = 0, d = descriptions; i < count; d++, i++) - o->callbacks_descriptions.array[i] = d; - - evas_smart_cb_descriptions_fix(&o->callbacks_descriptions); - - return EINA_TRUE; -} - -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) -{ - Evas_Object_Smart *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (class_descriptions) *class_descriptions = NULL; - if (class_count) *class_count = 0; - if (instance_descriptions) *instance_descriptions = NULL; - if (instance_count) *instance_count = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - if (class_descriptions) *class_descriptions = NULL; - if (class_count) *class_count = 0; - if (instance_descriptions) *instance_descriptions = NULL; - if (instance_count) *instance_count = 0; - return; - MAGIC_CHECK_END(); - - if (class_descriptions) - *class_descriptions = obj->smart.smart->callbacks.array; - if (class_count) - *class_count = obj->smart.smart->callbacks.size; - - if (instance_descriptions) - *instance_descriptions = o->callbacks_descriptions.array; - if (instance_count) - *instance_count = o->callbacks_descriptions.size; -} - -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) -{ - Evas_Object_Smart *o; - - if (!name) - { - if (class_description) *class_description = NULL; - if (instance_description) *instance_description = NULL; - return; - } - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (class_description) *class_description = NULL; - if (instance_description) *instance_description = NULL; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - if (class_description) *class_description = NULL; - if (instance_description) *instance_description = NULL; - return; - MAGIC_CHECK_END(); - - if (class_description) - *class_description = evas_smart_cb_description_find - (&obj->smart.smart->callbacks, name); - - if (instance_description) - *instance_description = evas_smart_cb_description_find - (&o->callbacks_descriptions, name); -} - -EAPI void -evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) -{ - Evas_Object_Smart *o; - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = obj->object_data; - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - - // XXX: do i need this? - if (obj->delete_me) return; - - /* remove this entry from calc_list or processed list */ - if (eina_clist_element_is_linked(&obj->calc_entry)) - eina_clist_remove(&obj->calc_entry); - - value = !!value; - if (value) - eina_clist_add_tail(&obj->layer->evas->calc_list, &obj->calc_entry); - else - eina_clist_add_tail(&obj->layer->evas->calc_done, &obj->calc_entry); - - if (o->need_recalculate == value) return; - - if (obj->recalculate_cycle > 254) - { - ERR("Object %p is not stable during recalc loop", obj); - return; - } - if (obj->layer->evas->in_smart_calc) obj->recalculate_cycle++; - o->need_recalculate = value; -} - -EAPI Eina_Bool -evas_object_smart_need_recalculate_get(const Evas_Object *obj) -{ - Evas_Object_Smart *o; - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - o = obj->object_data; - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return EINA_FALSE; - MAGIC_CHECK_END(); - - return o->need_recalculate; -} - -EAPI void -evas_object_smart_calculate(Evas_Object *obj) -{ - Evas_Object_Smart *o; - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = obj->object_data; - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - - if (!obj->smart.smart->smart_class->calculate) - return; - - o->need_recalculate = 0; - obj->smart.smart->smart_class->calculate(obj); -} - -EAPI void -evas_smart_objects_calculate(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - evas_call_smarts_calculate(e); -} - -EAPI int -evas_smart_objects_calculate_count_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return e->smart_calc_count; -} - -/** - * Call calculate() on all smart objects that need_recalculate. - * - * @internal - */ -void -evas_call_smarts_calculate(Evas *e) -{ - Eina_Clist *elem; - Evas_Object *obj; - -// printf("+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALC-----------v\n"); - evas_event_freeze(e); - e->in_smart_calc++; - - while (NULL != (elem = eina_clist_head(&e->calc_list))) - { - Evas_Object_Smart *o; - - /* move the item to the processed list */ - obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry); - eina_clist_remove(&obj->calc_entry); - if (obj->delete_me) continue; - eina_clist_add_tail(&e->calc_done, &obj->calc_entry); - - o = obj->object_data; - - if (o->need_recalculate) - { - o->need_recalculate = 0; - obj->smart.smart->smart_class->calculate(obj); - } - } - - while (NULL != (elem = eina_clist_head(&e->calc_done))) - { - obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry); - obj->recalculate_cycle = 0; - eina_clist_remove(&obj->calc_entry); - } - - e->in_smart_calc--; - if (e->in_smart_calc == 0) e->smart_calc_count++; - evas_event_thaw(e); - evas_event_thaw_eval(e); -} - -EAPI void -evas_object_smart_changed(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - evas_object_change(obj); - evas_object_smart_need_recalculate_set(obj, 1); -} - -/* internal calls */ -static void -evas_object_smart_callbacks_clear(Evas_Object *obj) -{ - Evas_Object_Smart *o; - Eina_List *l; - Evas_Smart_Callback *cb; - - o = (Evas_Object_Smart *)(obj->object_data); - - if (o->walking_list) return; - 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); - EVAS_MEMPOOL_FREE(_mp_cb, cb); - } - } -} - -void -evas_object_smart_del(Evas_Object *obj) -{ - Evas_Smart *s; - - if (obj->delete_me) return; - s = obj->smart.smart; - if ((s) && (s->smart_class->del)) s->smart_class->del(obj); - if (obj->smart.parent) evas_object_smart_member_del(obj); - if (s) evas_object_smart_unuse(s); -} - -void -evas_object_smart_cleanup(Evas_Object *obj) -{ - Evas_Object_Smart *o; - - if (obj->smart.parent) - evas_object_smart_member_del(obj); - - o = (Evas_Object_Smart *)(obj->object_data); - if (o->magic == MAGIC_OBJ_SMART) - { - if (obj->calc_entry.next) - eina_clist_remove(&obj->calc_entry); - - while (o->contained) - evas_object_smart_member_del((Evas_Object *)o->contained); - - while (o->callbacks) - { - Evas_Smart_Callback *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; - } - - obj->smart.parent = NULL; - obj->smart.smart = NULL; -} - -void -evas_object_smart_member_cache_invalidate(Evas_Object *obj, - Eina_Bool pass_events, - Eina_Bool freeze_events) -{ - Evas_Object_Smart *o; - Evas_Object *member; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - - if (pass_events) - obj->parent_cache.pass_events_valid = EINA_FALSE; - if (freeze_events) - obj->parent_cache.freeze_events_valid = EINA_FALSE; - - o = obj->object_data; - if (o->magic != MAGIC_OBJ_SMART) return; - - EINA_INLIST_FOREACH(o->contained, member) - evas_object_smart_member_cache_invalidate(member, - pass_events, - freeze_events); -} - -void -evas_object_smart_member_raise(Evas_Object *member) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(member->smart.parent->object_data); - o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member)); -} - -void -evas_object_smart_member_lower(Evas_Object *member) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(member->smart.parent->object_data); - o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member)); -} - -void -evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(member->smart.parent->object_data); - o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); - o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); -} - -void -evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(member->smart.parent->object_data); - o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); - o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); -} - -/* all nice and private */ -static void -evas_object_smart_init(Evas_Object *obj) -{ - /* alloc smart obj, setup methods and default values */ - obj->object_data = evas_object_smart_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; -} - -static void * -evas_object_smart_new(void) -{ - Evas_Object_Smart *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_smart", Evas_Object_Smart, 256, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Smart); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Smart); - o->magic = MAGIC_OBJ_SMART; - return o; -} - -static void -evas_object_smart_free(Evas_Object *obj) -{ - Evas_Object_Smart *o; - - /* frees private object data. very simple here */ - o = (Evas_Object_Smart *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); - return; - MAGIC_CHECK_END(); - /* free obj */ - o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -static void -evas_object_smart_render(Evas_Object *obj __UNUSED__, void *output __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__) -{ - return; -} - -static void -evas_object_smart_render_pre(Evas_Object *obj) -{ - if (obj->pre_render_done) return; - 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); - goto done; - } -done: - obj->pre_render_done = 1; -} - -static void -evas_object_smart_render_post(Evas_Object *obj) -{ - obj->prev = obj->cur; -} - -static unsigned int evas_object_smart_id_get(Evas_Object *obj) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_SMART; -} - -static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_CONTAINER; -} - -static void *evas_object_smart_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Smart *o; - - o = (Evas_Object_Smart *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c b/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c deleted file mode 100644 index 9b9fa6d..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_smart_clipped.c +++ /dev/null @@ -1,183 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -#define CSO_DATA_GET_OR_RETURN(obj, ptr) \ - Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \ - if (!ptr) return; - -EAPI void -evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) -{ - const Eina_Inlist *lst; - Evas_Object *child; - - if ((dx == 0) && (dy == 0)) - return; - - lst = evas_object_smart_members_get_direct(obj); - EINA_INLIST_FOREACH(lst, child) - { - Evas_Coord orig_x, orig_y; - -// shortcut as we are in evas -// evas_object_geometry_get(child, &orig_x, &orig_y, NULL, NULL); - if (child->delete_me) continue; - if (child->is_static_clip) continue; - orig_x = child->cur.geometry.x; - orig_y = child->cur.geometry.y; - evas_object_move(child, orig_x + dx, orig_y + dy); - } -} - -EAPI Evas_Object * -evas_object_smart_clipped_clipper_get(Evas_Object *obj) -{ - Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(obj); - if (!cso) - return NULL; - - return cso->clipper; -} - -static void -evas_object_smart_clipped_smart_add(Evas_Object *obj) -{ - Evas_Object_Smart_Clipped_Data *cso; - Evas_Object *clipper; - - cso = evas_object_smart_data_get(obj); - if (!cso) - cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */ - - cso->evas = evas_object_evas_get(obj); - clipper = evas_object_rectangle_add(cso->evas); - evas_object_static_clip_set(clipper, 1); - cso->clipper = NULL; - evas_object_smart_member_add(clipper, obj); - cso->clipper = clipper; - evas_object_color_set(cso->clipper, 255, 255, 255, 255); - evas_object_move(cso->clipper, -100000, -100000); - evas_object_resize(cso->clipper, 200000, 200000); - evas_object_pass_events_set(cso->clipper, 1); - evas_object_hide(cso->clipper); /* show when have something clipped to it */ - - evas_object_smart_data_set(obj, cso); -} - -static void -evas_object_smart_clipped_smart_del(Evas_Object *obj) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - - if (cso->clipper) - { - Evas_Object *clipper = cso->clipper; - cso->clipper = NULL; - evas_object_del(clipper); - } - - _evas_object_smart_members_all_del(obj); - - free(cso); - evas_object_smart_data_set(obj, NULL); -} - -static void -evas_object_smart_clipped_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - Evas_Coord orig_x, orig_y; - - evas_object_geometry_get(obj, &orig_x, &orig_y, NULL, NULL); - evas_object_smart_move_children_relative(obj, x - orig_x, y - orig_y); -} - -static void -evas_object_smart_clipped_smart_show(Evas_Object *obj) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - if (evas_object_clipees_get(cso->clipper)) - evas_object_show(cso->clipper); /* just show if clipper being used */ -} - -static void -evas_object_smart_clipped_smart_hide(Evas_Object *obj) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - evas_object_hide(cso->clipper); -} - -static void -evas_object_smart_clipped_smart_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - evas_object_color_set(cso->clipper, r, g, b, a); -} - -static void -evas_object_smart_clipped_smart_clip_set(Evas_Object *obj, Evas_Object *clip) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - evas_object_clip_set(cso->clipper, clip); -} - -static void -evas_object_smart_clipped_smart_clip_unset(Evas_Object *obj) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - evas_object_clip_unset(cso->clipper); -} - -static void -evas_object_smart_clipped_smart_member_add(Evas_Object *obj, Evas_Object *member) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - if (!cso->clipper) - return; - evas_object_clip_set(member, cso->clipper); - if (evas_object_visible_get(obj)) - evas_object_show(cso->clipper); -} - -static void -evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member) -{ - CSO_DATA_GET_OR_RETURN(obj, cso); - if (!cso->clipper) - return; - evas_object_clip_unset(member); - if (!evas_object_clipees_get(cso->clipper)) - evas_object_hide(cso->clipper); -} - -EAPI void -evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) -{ - if (!sc) - return; - - sc->add = evas_object_smart_clipped_smart_add; - sc->del = evas_object_smart_clipped_smart_del; - sc->move = evas_object_smart_clipped_smart_move; - sc->show = evas_object_smart_clipped_smart_show; - sc->hide = evas_object_smart_clipped_smart_hide; - sc->color_set = evas_object_smart_clipped_smart_color_set; - sc->clip_set = evas_object_smart_clipped_smart_clip_set; - sc->clip_unset = evas_object_smart_clipped_smart_clip_unset; - sc->calculate = NULL; - sc->member_add = evas_object_smart_clipped_smart_member_add; - sc->member_del = evas_object_smart_clipped_smart_member_del; -} - -EAPI const Evas_Smart_Class * -evas_object_smart_clipped_class_get(void) -{ - static Evas_Smart_Class _sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("EvasObjectSmartClipped"); - static const Evas_Smart_Class *class = NULL; - - if (class) - return class; - - evas_object_smart_clipped_smart_set(&_sc); - class = &_sc; - return class; -} diff --git a/libraries/evas/src/lib/canvas/evas_object_table.c b/libraries/evas/src/lib/canvas/evas_object_table.c deleted file mode 100644 index cdfa07f..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_table.c +++ /dev/null @@ -1,1373 +0,0 @@ -#include "evas_common.h" -#include - -typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data; -typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option; -typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache; -typedef struct _Evas_Object_Table_Iterator Evas_Object_Table_Iterator; -typedef struct _Evas_Object_Table_Accessor Evas_Object_Table_Accessor; - -struct _Evas_Object_Table_Option -{ - Evas_Object *obj; - unsigned short col, row, colspan, rowspan, end_col, end_row; - struct { - Evas_Coord w, h; - } min, max; - struct { - double h, v; - } align; - struct { - Evas_Coord l, r, t, b; - } pad; - Eina_Bool expand_h : 1; /* XXX required? */ - Eina_Bool expand_v : 1; /* XXX required? */ - Eina_Bool fill_h : 1; - Eina_Bool fill_v : 1; -}; - -struct _Evas_Object_Table_Cache -{ - struct { - struct { - double h, v; - } weights; - struct { - int h, v; - } expands; - struct { - Evas_Coord w, h; - } 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 -{ - Evas_Object_Smart_Clipped_Data base; - Eina_List *children; - struct { - Evas_Coord h, v; - } pad; - struct { - double h, v; - } align; - struct { - int cols, rows; - } size; - Evas_Object_Table_Cache *cache; - Evas_Object_Table_Homogeneous_Mode homogeneous; - Eina_Bool hints_changed : 1; - Eina_Bool expand_h : 1; - Eina_Bool expand_v : 1; - Eina_Bool is_mirrored : 1; -}; - -struct _Evas_Object_Table_Iterator -{ - Eina_Iterator iterator; - - Eina_Iterator *real_iterator; - const Evas_Object *table; -}; - -struct _Evas_Object_Table_Accessor -{ - Eina_Accessor accessor; - - Eina_Accessor *real_accessor; - const Evas_Object *table; -}; - -#define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \ - Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o) - -#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \ - EVAS_OBJECT_TABLE_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_TABLE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ - EVAS_OBJECT_TABLE_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_TABLE_OPTION_KEY[] = "|EvTb"; - -static Eina_Bool -_evas_object_table_iterator_next(Evas_Object_Table_Iterator *it, void **data) -{ - Evas_Object_Table_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_table_iterator_get_container(Evas_Object_Table_Iterator *it) -{ - return (Evas_Object *)it->table; -} - -static void -_evas_object_table_iterator_free(Evas_Object_Table_Iterator *it) -{ - eina_iterator_free(it->real_iterator); - free(it); -} - -static Eina_Bool -_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, idx, (void **)&opt)) - return EINA_FALSE; - if (data) *data = opt->obj; - return EINA_TRUE; -} - -static Evas_Object * -_evas_object_table_accessor_get_container(Evas_Object_Table_Accessor *it) -{ - return (Evas_Object *)it->table; -} - -static void -_evas_object_table_accessor_free(Evas_Object_Table_Accessor *it) -{ - eina_accessor_free(it->real_accessor); - free(it); -} - -static Evas_Object_Table_Cache * -_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(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); - cache = malloc(size); - if (!cache) - { - ERR("Could not allocate table cache %dx%d (%d bytes): %s", - cols, rows, size, strerror(errno)); - return NULL; - } - - 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); - - return cache; -} - -static void -_evas_object_table_cache_free(Evas_Object_Table_Cache *cache) -{ - free(cache); -} - -static void -_evas_object_table_cache_reset(Evas_Object_Table_Data *priv) -{ - Evas_Object_Table_Cache *c = priv->cache; - int size; - - c->total.expands.v = 0; - c->total.expands.h = 0; - c->total.min.w = 0; - c->total.min.h = 0; - - size = ((priv->size.rows + priv->size.cols) * - (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); - memset(c + 1, 0, size); -} - -static void -_evas_object_table_cache_invalidate(Evas_Object_Table_Data *priv) -{ - priv->hints_changed = 1; - if (priv->cache) - { - _evas_object_table_cache_free(priv->cache); - priv->cache = NULL; - } -} - -static Evas_Object_Table_Option * -_evas_object_table_option_get(Evas_Object *o) -{ - return evas_object_data_get(o, EVAS_OBJECT_TABLE_OPTION_KEY); -} - -static void -_evas_object_table_option_set(Evas_Object *o, const Evas_Object_Table_Option *opt) -{ - evas_object_data_set(o, EVAS_OBJECT_TABLE_OPTION_KEY, opt); -} - -static Evas_Object_Table_Option * -_evas_object_table_option_del(Evas_Object *o) -{ - return evas_object_data_del(o, EVAS_OBJECT_TABLE_OPTION_KEY); -} - -static void -_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__) -{ - Evas_Object *table = data; - evas_object_table_unpack(table, child); -} - -static void -_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *child __UNUSED__, void *einfo __UNUSED__) -{ - Evas_Object *table = data; - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(table, priv); - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(table); -} - -static void -_evas_object_table_child_connect(Evas_Object *o, Evas_Object *child) -{ - evas_object_event_callback_add - (child, EVAS_CALLBACK_DEL, _on_child_del, o); - evas_object_event_callback_add - (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); -} - -static void -_evas_object_table_child_disconnect(Evas_Object *o, Evas_Object *child) -{ - evas_object_event_callback_del_full - (child, EVAS_CALLBACK_DEL, _on_child_del, o); - evas_object_event_callback_del_full - (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); -} - -static void -_evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - Evas_Coord cw, ch; - - *w -= opt->pad.l + opt->pad.r; - if (*w < opt->min.w) - cw = opt->min.w; - else if ((opt->max.w > -1) && (*w > opt->max.w)) - cw = opt->max.w; - else if (opt->fill_h) - cw = *w; - else - cw = opt->min.w; - - *h -= opt->pad.t + opt->pad.b; - if (*h < opt->min.h) - ch = opt->min.h; - else if ((opt->max.h > -1) && (*h > opt->max.h)) - ch = opt->max.h; - else if (opt->fill_v) - ch = *h; - else - ch = opt->min.h; - - *x += opt->pad.l; - if (cw != *w) - { - *x += (*w - cw) * opt->align.h; - *w = cw; - } - - *y += opt->pad.t; - if (ch != *h) - { - *y += (*h - ch) * opt->align.v; - *h = ch; - } -} - -static void -_evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - Eina_List *l; - Evas_Object_Table_Option *opt; - Evas_Coord minw, minh, o_minw, o_minh; - Eina_Bool expand_h, expand_v; - - o_minw = 0; - o_minh = 0; - minw = 0; - minh = 0; - expand_h = 0; - expand_v = 0; - - EINA_LIST_FOREACH(priv->children, l, opt) - { - Evas_Object *child = opt->obj; - Evas_Coord child_minw, child_minh, cell_minw, cell_minh; - double weightw, weighth; - - evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); - evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); - evas_object_size_hint_padding_get - (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); - evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); - evas_object_size_hint_weight_get(child, &weightw, &weighth); - - child_minw = opt->min.w + opt->pad.l + opt->pad.r; - child_minh = opt->min.h + opt->pad.t + opt->pad.b; - - cell_minw = (child_minw + opt->colspan - 1) / opt->colspan; - cell_minh = (child_minh + opt->rowspan - 1) / opt->rowspan; - - opt->expand_h = 0; - if ((weightw > 0.0) && - ((opt->max.w < 0) || - ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) - { - opt->expand_h = 1; - expand_h = 1; - } - - opt->expand_v = 0; - if ((weighth > 0.0) && - ((opt->max.h < 0) || - ((opt->max.h > -1) && (opt->min.h < opt->max.h)))) - { - opt->expand_v = 1; - expand_v = 1; - } - - opt->fill_h = 0; - if (opt->align.h < 0.0) - { - opt->align.h = 0.5; - opt->fill_h = 1; - } - opt->fill_v = 0; - if (opt->align.v < 0.0) - { - opt->align.v = 0.5; - opt->fill_v = 1; - } - - /* greatest mininum values, with paddings */ - if (minw < cell_minw) - minw = cell_minw; - if (minh < cell_minh) - minh = cell_minh; - /* greatest mininum values, without paddings */ - if (o_minw < opt->min.w) - o_minw = opt->min.w; - if (o_minh < opt->min.h) - o_minh = opt->min.h; - } - - if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) - { - if (o_minw < 1) - { - ERR("homogeneous table based on item size but no " - "horizontal mininum size specified! Using expand."); - expand_h = 1; - } - if (o_minh < 1) - { - ERR("homogeneous table based on item size but no " - "vertical mininum size specified! Using expand."); - expand_v = 1; - } - } - - minw = priv->size.cols * (minw + priv->pad.h) - priv->pad.h; - minh = priv->size.rows * (minh + priv->pad.v) - priv->pad.v; - - priv->hints_changed = 0; - priv->expand_h = expand_h; - priv->expand_v = expand_v; - - if ((minw > 0 ) || (minh > 0)) - evas_object_size_hint_min_set(o, minw, minh); - - // XXX hint max? -} - -static void -_evas_object_table_calculate_layout_homogeneous_sizes_item(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - Evas_Coord minw, minh; - Eina_Bool expand_h, expand_v; - - evas_object_size_hint_min_get(o, &minw, &minh); - expand_h = priv->expand_h; - expand_v = priv->expand_v; - - if (*w < minw) - expand_h = 0; - if (!expand_h) - { - *x += (*w - minw) * priv->align.h; - *w = minw; - } - - if (*h < minh) - expand_v = 0; - if (!expand_v) - { - *y += (*h - minh) * priv->align.v; - *h = minh; - } -} - -static void -_evas_object_table_calculate_layout_homogeneous_sizes(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h, Evas_Coord *cellw, Evas_Coord *cellh) -{ - evas_object_geometry_get(o, x, y, w, h); - if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) - _evas_object_table_calculate_layout_homogeneous_sizes_item - (o, priv, x, y, w, h); - - *cellw = (*w + priv->size.cols - 1) / priv->size.cols; - *cellh = (*h + priv->size.rows - 1) / priv->size.rows; -} - -static void -_evas_object_table_calculate_layout_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - 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, cox, coy, cow, coh; - - 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; - - 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) - { - evas_object_move(opt->obj, x + w - (cx - x + cw), cy); - } - else - { - evas_object_move(child, cx, cy); - } - evas_object_resize(child, cw, ch); - } -} - -static void -_evas_object_table_smart_calculate_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - if (priv->hints_changed) - _evas_object_table_calculate_hints_homogeneous(o, priv); - _evas_object_table_calculate_layout_homogeneous(o, priv); -} - -static int -_evas_object_table_count_expands(const Eina_Bool *expands, int start, int end) -{ - const Eina_Bool *itr = expands + start, *itr_end = expands + end; - int count = 0; - - for (; itr < itr_end; itr++) - { - if (*itr) - count++; - } - - return count; -} - -static Evas_Coord -_evas_object_table_sum_sizes(const Evas_Coord *sizes, int start, int end) -{ - const Evas_Coord *itr = sizes + start, *itr_end = sizes + end; - Evas_Coord sum = 0; - - for (; itr < itr_end; itr++) - sum += *itr; - - return sum; -} - -static void -_evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Evas_Coord space) -{ - Evas_Coord *itr = sizes + start, *itr_end = sizes + end - 1; - Evas_Coord step; - int units; - - /* XXX move to fixed point math and spread errors among cells */ - units = end - start; - step = space / units; - for (; itr < itr_end; itr++) - *itr += step; - - *itr += space - step * (units - 1); -} - -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, double *weights, double weighttot) -{ - Evas_Coord *itr = sizes + start, *itr_end = sizes + end; - const Eina_Bool *itr_expand = expands + start; - Evas_Coord step = 0, last_space = 0; - int total = 0, i = start; - - /* XXX move to fixed point math and spread errors among cells */ - 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 -_evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - 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 - (priv->size.cols, priv->size.rows); - if (!priv->cache) - return; - } - c = priv->cache; - _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; - double weightw, weighth; - - evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); - evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); - evas_object_size_hint_padding_get - (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); - evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); - evas_object_size_hint_weight_get(child, &weightw, &weighth); - - opt->expand_h = 0; - if ((weightw > 0.0) && - ((opt->max.w < 0) || - ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) - opt->expand_h = 1; - - opt->expand_v = 0; - if ((weighth > 0.0) && - ((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) - { - opt->align.h = 0.5; - opt->fill_h = 1; - } - opt->fill_v = 0; - if (opt->align.v < 0.0) - { - opt->align.v = 0.5; - opt->fill_v = 1; - } - - 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) - { - Evas_Coord tot, need; - - /* handle horizontal */ - tot = _evas_object_table_sum_sizes(c->sizes.h, opt->col, opt->end_col); - need = opt->min.w + opt->pad.l + opt->pad.r; - if (tot < need) - { - Evas_Coord space = need - tot; - int count; - - count = _evas_object_table_count_expands - (c->expands.h, opt->col, opt->end_col); - - if (count > 0) - _evas_object_table_sizes_calc_expand - (c->sizes.h, opt->col, opt->end_col, space, - c->expands.h, count, c->weights.h, totweightw); - else - _evas_object_table_sizes_calc_noexpand - (c->sizes.h, opt->col, opt->end_col, space); - } - - /* handle vertical */ - tot = _evas_object_table_sum_sizes(c->sizes.v, opt->row, opt->end_row); - need = opt->min.h + opt->pad.t + opt->pad.b; - if (tot < opt->min.h) - { - Evas_Coord space = need - tot; - int count; - - count = _evas_object_table_count_expands - (c->expands.v, opt->row, opt->end_row); - - if (count > 0) - _evas_object_table_sizes_calc_expand - (c->sizes.v, opt->row, opt->end_row, space, - 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 - (c->expands.v, 0, priv->size.rows); - - c->total.min.w = _evas_object_table_sum_sizes - (c->sizes.h, 0, priv->size.cols); - c->total.min.h = _evas_object_table_sum_sizes - (c->sizes.v, 0, priv->size.rows); - - c->total.min.w += priv->pad.h * (priv->size.cols - 1); - c->total.min.h += priv->pad.v * (priv->size.rows - 1); - - if ((c->total.min.w > 0) || (c->total.min.h > 0)) - evas_object_size_hint_min_set(o, c->total.min.w, c->total.min.h); - - // XXX hint max? -} - -static void -_evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - Evas_Object_Table_Option *opt; - Evas_Object_Table_Cache *c; - Eina_List *l; - Evas_Coord *cols = NULL, *rows = NULL; - Evas_Coord x, y, w, h; - - evas_object_geometry_get(o, &x, &y, &w, &h); - c = priv->cache; - - /* handle horizontal */ - if ((c->total.expands.h <= 0) || (c->total.min.w >= w)) - { - x += (w - c->total.min.w) * priv->align.h; - w = c->total.min.w; - cols = c->sizes.h; - } - else - { - int size = priv->size.cols * sizeof(Evas_Coord); - cols = malloc(size); - if (!cols) - { - ERR("Could not allocate temp columns (%d bytes): %s", - size, strerror(errno)); - goto end; - } - 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->weights.h, c->total.weights.h); - } - - /* handle vertical */ - if ((c->total.expands.v <= 0) || (c->total.min.h >= h)) - { - y += (h - c->total.min.h) * priv->align.v; - h = c->total.min.h; - rows = c->sizes.v; - } - else - { - int size = priv->size.rows * sizeof(Evas_Coord); - rows = malloc(size); - if (!rows) - { - ERR("could not allocate temp rows (%d bytes): %s", - size, strerror(errno)); - goto end; - } - 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->weights.v, c->total.weights.v); - } - - EINA_LIST_FOREACH(priv->children, l, opt) - { - Evas_Object *child = opt->obj; - Evas_Coord cx, cy, cw, ch; - - cx = x + opt->col * (priv->pad.h); - cx += _evas_object_table_sum_sizes(cols, 0, opt->col); - cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); - - cy = y + opt->row * (priv->pad.v); - cy += _evas_object_table_sum_sizes(rows, 0, opt->row); - ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); - - _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); - - if (priv->is_mirrored) - { - evas_object_move(opt->obj, x + w - (cx - x + cw), cy); - } - else - { - evas_object_move(child, cx, cy); - } - evas_object_resize(child, cw, ch); - } - - end: - if (cols != c->sizes.h) - { - if (cols) free(cols); - } - if (rows != c->sizes.v) - { - if (rows) free(rows); - } -} - -static void -_evas_object_table_smart_calculate_regular(Evas_Object *o, Evas_Object_Table_Data *priv) -{ - if (priv->hints_changed) - _evas_object_table_calculate_hints_regular(o, priv); - _evas_object_table_calculate_layout_regular(o, priv); -} - -EVAS_SMART_SUBCLASS_NEW("Evas_Object_Table", _evas_object_table, - Evas_Smart_Class, Evas_Smart_Class, - evas_object_smart_clipped_class_get, NULL) - -static void -_evas_object_table_smart_add(Evas_Object *o) -{ - EVAS_SMART_DATA_ALLOC(o, Evas_Object_Table_Data) - - priv->pad.h = 0; - priv->pad.v = 0; - priv->align.h = 0.5; - priv->align.v = 0.5; - priv->size.cols = 0; - priv->size.rows = 0; - priv->cache = NULL; - priv->homogeneous = EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE; - priv->hints_changed = 1; - priv->expand_h = 0; - priv->expand_v = 0; - - _evas_object_table_parent_sc->add(o); -} - -static void -_evas_object_table_smart_del(Evas_Object *o) -{ - EVAS_OBJECT_TABLE_DATA_GET(o, priv); - Eina_List *l; - - l = priv->children; - while (l) - { - Evas_Object_Table_Option *opt = l->data; - _evas_object_table_child_disconnect(o, opt->obj); - _evas_object_table_option_del(opt->obj); - free(opt); - l = eina_list_remove_list(l, l); - } - - if (priv->cache) - { - _evas_object_table_cache_free(priv->cache); - priv->cache = NULL; - } - - _evas_object_table_parent_sc->del(o); -} - -static void -_evas_object_table_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_table_smart_calculate(Evas_Object *o) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); - - if ((priv->size.cols < 1) || (priv->size.rows < 1)) - { - DBG("Nothing to do: cols=%d, rows=%d", - priv->size.cols, priv->size.rows); - return; - } - - if (priv->homogeneous) - _evas_object_table_smart_calculate_homogeneous(o, priv); - else - _evas_object_table_smart_calculate_regular(o, priv); -} - -static void -_evas_object_table_smart_set_user(Evas_Smart_Class *sc) -{ - sc->add = _evas_object_table_smart_add; - sc->del = _evas_object_table_smart_del; - sc->resize = _evas_object_table_smart_resize; - sc->calculate = _evas_object_table_smart_calculate; -} - -EAPI Evas_Object * -evas_object_table_add(Evas *evas) -{ - return evas_object_smart_add(evas, _evas_object_table_smart_class_new()); -} - -EAPI Evas_Object * -evas_object_table_add_to(Evas_Object *parent) -{ - Evas *evas; - Evas_Object *o; - - evas = evas_object_evas_get(parent); - o = evas_object_table_add(evas); - evas_object_smart_member_add(o, parent); - return o; -} - -EAPI void -evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); - if (priv->homogeneous == homogeneous) - return; - priv->homogeneous = homogeneous; - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(o); -} - -EAPI Evas_Object_Table_Homogeneous_Mode -evas_object_table_homogeneous_get(const Evas_Object *o) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); - return priv->homogeneous; -} - -EAPI void -evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); - if (priv->align.h == horizontal && priv->align.v == vertical) - return; - priv->align.h = horizontal; - priv->align.v = vertical; - evas_object_smart_changed(o); -} - -EAPI void -evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical) -{ - EVAS_OBJECT_TABLE_DATA_GET(o, priv); - if (priv) - { - if (horizontal) *horizontal = priv->align.h; - if (vertical) *vertical = priv->align.v; - } - else - { - if (horizontal) *horizontal = 0.5; - if (vertical) *vertical = 0.5; - } -} - -EAPI void -evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); - if (priv->pad.h == horizontal && priv->pad.v == vertical) - return; - priv->pad.h = horizontal; - priv->pad.v = vertical; - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(o); -} - -EAPI void -evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) -{ - EVAS_OBJECT_TABLE_DATA_GET(o, priv); - if (priv) - { - if (horizontal) *horizontal = priv->pad.h; - if (vertical) *vertical = priv->pad.v; - } - else - { - if (horizontal) *horizontal = 0; - if (vertical) *vertical = 0; - } -} - -EAPI Eina_Bool -evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan) -{ - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); - opt = _evas_object_table_option_get(child); - if (!opt) - { - if (col) *col = 0; - if (row) *row = 0; - if (colspan) *colspan = 0; - if (rowspan) *rowspan = 0; - return EINA_FALSE; - } - if (col) *col = opt->col; - if (row) *row = opt->row; - if (colspan) *colspan = opt->colspan; - if (rowspan) *rowspan = opt->rowspan; - return EINA_TRUE; -} - -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) -{ - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); - - if (rowspan < 1) - { - ERR("rowspan < 1"); - return EINA_FALSE; - } - if (colspan < 1) - { - ERR("colspan < 1"); - return EINA_FALSE; - } - - opt = _evas_object_table_option_get(child); - if (!opt) - { - opt = malloc(sizeof(*opt)); - if (!opt) - { - ERR("could not allocate table option data."); - return EINA_FALSE; - } - } - - opt->obj = child; - opt->col = col; - opt->row = row; - opt->colspan = colspan; - opt->rowspan = rowspan; - opt->end_col = col + colspan; - opt->end_row = row + rowspan; - - if (evas_object_smart_parent_get(child) == o) - { - Eina_Bool need_shrink = EINA_FALSE; - - if (priv->size.cols < opt->end_col) - priv->size.cols = opt->end_col; - else - need_shrink = EINA_TRUE; - if (priv->size.rows < opt->end_row) - priv->size.rows = opt->end_row; - else - need_shrink = EINA_TRUE; - - if (need_shrink) - { - Eina_List *l; - Evas_Object_Table_Option *opt2; - int max_row = 0, max_col = 0; - - EINA_LIST_FOREACH(priv->children, l, opt2) - { - if (max_col < opt2->end_col) max_col = opt2->end_col; - if (max_row < opt2->end_row) max_row = opt2->end_row; - } - priv->size.cols = max_col; - priv->size.rows = max_row; - } - } - else - { - opt->min.w = 0; - opt->min.h = 0; - opt->max.w = 0; - opt->max.h = 0; - opt->align.h = 0.5; - opt->align.v = 0.5; - opt->pad.l = 0; - opt->pad.r = 0; - opt->pad.t = 0; - opt->pad.b = 0; - opt->expand_h = 0; - opt->expand_v = 0; - - priv->children = eina_list_append(priv->children, opt); - - if (priv->size.cols < opt->end_col) - priv->size.cols = opt->end_col; - if (priv->size.rows < opt->end_row) - priv->size.rows = opt->end_row; - - _evas_object_table_option_set(child, opt); - evas_object_smart_member_add(child, o); - _evas_object_table_child_connect(o, child); - } - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(o); - return EINA_TRUE; -} - -static void -_evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Option *opt) -{ - Eina_List *l; - int max_row, max_col, was_greatest; - - max_row = 0; - max_col = 0; - was_greatest = 0; - l = priv->children; - while (l) - { - Evas_Object_Table_Option *cur_opt = l->data; - - if (cur_opt != opt) - { - if (max_col < cur_opt->end_col) - max_col = cur_opt->end_col; - if (max_row < cur_opt->end_row) - max_row = cur_opt->end_row; - - l = l->next; - } - else - { - Eina_List *tmp = l->next; - priv->children = eina_list_remove_list(priv->children, l); - - if ((priv->size.cols > opt->end_col) && - (priv->size.rows > opt->end_row)) - break; - else - { - was_greatest = 1; - l = tmp; - } - } - } - - if (was_greatest) - { - priv->size.cols = max_col; - priv->size.rows = max_row; - } -} - -EAPI Eina_Bool -evas_object_table_unpack(Evas_Object *o, Evas_Object *child) -{ - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); - - if (o != evas_object_smart_parent_get(child)) - { - ERR("cannot unpack child from incorrect table!"); - return EINA_FALSE; - } - - opt = _evas_object_table_option_del(child); - if (!opt) - { - ERR("cannot unpack child with no packing option!"); - return EINA_FALSE; - } - - _evas_object_table_child_disconnect(o, child); - _evas_object_table_remove_opt(priv, opt); - evas_object_smart_member_del(child); - free(opt); - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(o); - - return EINA_TRUE; -} - -EAPI void -evas_object_table_clear(Evas_Object *o, Eina_Bool clear) -{ - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); - - EINA_LIST_FREE(priv->children, opt) - { - _evas_object_table_child_disconnect(o, opt->obj); - _evas_object_table_option_del(opt->obj); - evas_object_smart_member_del(opt->obj); - if (clear) - evas_object_del(opt->obj); - free(opt); - } - priv->size.cols = 0; - priv->size.rows = 0; - _evas_object_table_cache_invalidate(priv); - evas_object_smart_changed(o); -} - -EAPI void -evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) -{ - EVAS_OBJECT_TABLE_DATA_GET(o, priv); - if (priv) - { - if (cols) *cols = priv->size.cols; - if (rows) *rows = priv->size.rows; - } - else - { - if (cols) *cols = -1; - if (rows) *rows = -1; - } -} - -EAPI Eina_Iterator * -evas_object_table_iterator_new(const Evas_Object *o) -{ - Evas_Object_Table_Iterator *it; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - if (!priv->children) return NULL; - - it = calloc(1, sizeof(Evas_Object_Table_Iterator)); - if (!it) return NULL; - - EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); - - it->real_iterator = eina_list_iterator_new(priv->children); - it->table = o; - - it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_table_iterator_next); - it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container); - it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free); - - return &it->iterator; -} - -EAPI Eina_Accessor * -evas_object_table_accessor_new(const Evas_Object *o) -{ - Evas_Object_Table_Accessor *it; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - if (!priv->children) return NULL; - - it = calloc(1, sizeof(Evas_Object_Table_Accessor)); - if (!it) return NULL; - - EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); - - it->real_accessor = eina_list_accessor_new(priv->children); - it->table = o; - - it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_table_accessor_get_at); - it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container); - it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free); - - return &it->accessor; -} - -EAPI Eina_List * -evas_object_table_children_get(const Evas_Object *o) -{ - Eina_List *new_list = NULL, *l; - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_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; -} - -Evas_Object * -evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) -{ - Eina_List *l; - Evas_Object_Table_Option *opt; - - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); - - EINA_LIST_FOREACH(priv->children, l, opt) - if (opt->col == col && opt->row == row) - return opt->obj; - return NULL; -} - -EAPI Eina_Bool -evas_object_table_mirrored_get(const Evas_Object *obj) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE); - - return priv->is_mirrored; -} - -EAPI void -evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) -{ - EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(obj, priv); - if (priv->is_mirrored != mirrored) - { - priv->is_mirrored = mirrored; - _evas_object_table_smart_calculate(obj); - } -} diff --git a/libraries/evas/src/lib/canvas/evas_object_text.c b/libraries/evas/src/lib/canvas/evas_object_text.c deleted file mode 100644 index dbe5e08..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_text.c +++ /dev/null @@ -1,1943 +0,0 @@ -#include "evas_common.h" /* Includes evas_bidi_utils stuff. */ -#include "evas_private.h" - -/* save typing */ -#define ENFN obj->layer->evas->engine.func -#define ENDT obj->layer->evas->engine.data.output - -/* private magic number for text objects */ -static const char o_type[] = "text"; - -/* private struct for text object internal data */ -typedef struct _Evas_Object_Text Evas_Object_Text; -typedef struct _Evas_Object_Text_Item Evas_Object_Text_Item; - -struct _Evas_Object_Text -{ - DATA32 magic; - - struct { - const char *utf8_text; /* The text exposed to the API */ - const char *font; - Evas_Font_Description *fdesc; - const char *source; - Evas_Font_Size size; - struct { - unsigned char r, g, b, a; - } outline, shadow, glow, glow2; - - 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; - - Evas_Font_Set *font; - - char changed : 1; -}; - -struct _Evas_Object_Text_Item -{ - EINA_INLIST; - - size_t text_pos; - size_t visual_pos; - Evas_Text_Props text_props; - Evas_Coord x, w, h, adv; -}; - -/* private methods for text objects */ -static void evas_object_text_init(Evas_Object *obj); -static void *evas_object_text_new(void); -static void evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_text_free(Evas_Object *obj); -static void evas_object_text_render_pre(Evas_Object *obj); -static void evas_object_text_render_post(Evas_Object *obj); - -static unsigned int evas_object_text_id_get(Evas_Object *obj); -static unsigned int evas_object_text_visual_id_get(Evas_Object *obj); -static void *evas_object_text_engine_data_get(Evas_Object *obj); - -static int evas_object_text_is_opaque(Evas_Object *obj); -static int evas_object_text_was_opaque(Evas_Object *obj); - -static void evas_object_text_scale_update(Evas_Object *obj); -static void _evas_object_text_recalc(Evas_Object *obj); - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_text_free, - evas_object_text_render, - evas_object_text_render_pre, - evas_object_text_render_post, - evas_object_text_id_get, - evas_object_text_visual_id_get, - evas_object_text_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_text_is_opaque, - evas_object_text_was_opaque, - NULL, - NULL, - NULL, - evas_object_text_scale_update, - NULL, - NULL, - NULL -}; - -/* the actual api call to add a rect */ -/* it has no other api calls as all properties are standard */ - -EVAS_MEMPOOL(_mp_obj); - -static int -_evas_object_text_char_coords_get(const Evas_Object *obj, - const Evas_Object_Text *o, - size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) -{ - Evas_Object_Text_Item *it; - - EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) - { - if ((it->text_pos <= pos) && - (pos < (it->text_pos + it->text_props.text_len))) - { - int ret; - ret = ENFN->font_char_coords_get(ENDT, o->font, - &it->text_props, pos - it->text_pos, x, y, w, h); - if (x) *x += it->x; - return ret; - } - } - return 0; -} - -static void -_evas_object_text_item_clean(Evas_Object_Text_Item *it) -{ - evas_common_text_props_content_unref(&it->text_props); -} - -static void -_evas_object_text_items_clear(Evas_Object_Text *o) -{ - Evas_Object_Text_Item *it; - - while (o->items) - { - it = o->items; - o->items = (Evas_Object_Text_Item *) eina_inlist_remove( - EINA_INLIST_GET(o->items), - EINA_INLIST_GET(it)); - _evas_object_text_item_clean(it); - free(it); - } -} - -#ifdef BIDI_SUPPORT -static int -_evas_object_text_it_compare_logical(const void *_it1, const void *_it2) -{ - const Evas_Object_Text_Item *it1 = _it1, *it2 = _it2; - if (it1->text_pos < it2->text_pos) - return -1; - else if (it1->text_pos == it2->text_pos) - return 0; - else - return 1; - -} -#endif - -static int -_evas_object_text_last_up_to_pos(const Evas_Object *obj, - const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy) -{ - Evas_Object_Text_Item *it; - -#ifdef BIDI_SUPPORT - /*FIXME: not very efficient, sort the items arrays. */ - /* Reorder if it's a bidi text */ - if (o->bidi_par_props) - { - Eina_List *logical_it = NULL; - Evas_Object_Text_Item *i; - Eina_List *itr; - Evas_Coord x = 0; - /* Insert all to the logical list */ - EINA_INLIST_FOREACH(o->items, i) - { - logical_it = eina_list_sorted_insert(logical_it, - _evas_object_text_it_compare_logical, i); - } - EINA_LIST_FOREACH(logical_it, itr, it) - { - if ((x <= cx) && (cx < x + it->adv)) - { - return it->text_pos + ENFN->font_last_up_to_pos(ENDT, - o->font, - &it->text_props, - cx - x, - cy); - } - x += it->adv; - } - eina_list_free(logical_it); - } - else -#endif - { - EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) - { - if ((it->x <= cx) && (cx < it->x + it->adv)) - { - return it->text_pos + ENFN->font_last_up_to_pos(ENDT, - o->font, - &it->text_props, - cx - it->x, - cy); - } - } - } - return -1; -} - -static int -_evas_object_text_char_at_coords(const Evas_Object *obj, - const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy, - Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh) -{ - Evas_Object_Text_Item *it; - - EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) - { - if ((it->x <= cx) && (cx < it->x + it->adv)) - { - return it->text_pos + ENFN->font_char_at_coords_get(ENDT, - o->font, - &it->text_props, - cx - it->x, - cy, - rx, ry, - rw, rh); - } - } - return -1; -} - -static Evas_Coord -_evas_object_text_horiz_advance_get(const Evas_Object *obj, - const Evas_Object_Text *o) -{ - Evas_Object_Text_Item *it; - Evas_Coord adv; - (void) obj; - - adv = 0; - EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) - { - adv += it->adv; - } - return adv; -} - -static Evas_Coord -_evas_object_text_vert_advance_get(const Evas_Object *obj __UNUSED__, - const Evas_Object_Text *o) -{ - return o->max_ascent + o->max_descent; -} - -EAPI Evas_Object * -evas_object_text_add(Evas *e) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_text_init(obj); - evas_object_inject(obj, e); - return obj; -} - -EAPI void -evas_object_text_font_source_set(Evas_Object *obj, const char *font_source) -{ - 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(); - - if ((o->cur.source) && (font_source) && - (!strcmp(o->cur.source, font_source))) - return; - /* - if (o->cur.source) eina_stringshare_del(o->cur.source); - if (font_source) o->cur.source = eina_stringshare_add(font_source); - else o->cur.source = NULL; - */ - eina_stringshare_replace(&o->cur.source, font_source); -} - -EAPI const char * -evas_object_text_font_source_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->cur.source; -} - -EAPI void -evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size) -{ - Evas_Object_Text *o; - int is, was = 0, pass = 0, freeze = 0; - Evas_Font_Description *fdesc; - - if ((!font) || (size <= 0)) return; - 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(); - - fdesc = evas_font_desc_new(); - evas_font_name_parse(fdesc, font); - if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) && - (size == o->cur.size)) - { - evas_font_desc_unref(fdesc); - return; - } - - if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); - o->cur.fdesc = fdesc; - - o->cur.size = size; - eina_stringshare_replace(&o->cur.font, font); - o->prev.font = NULL; - - if (obj->layer->evas->events_frozen <= 0) - { - pass = evas_event_passes_through(obj); - freeze = evas_event_freezes_through(obj); - if ((!pass) && (!freeze)) - was = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); - } - -#ifdef EVAS_FRAME_QUEUING - if (o->font) - evas_common_pipe_op_text_flush((RGBA_Font *) o->font); -#endif - - /* DO IT */ - if (o->font) - { - evas_font_free(obj->layer->evas, o->font); - o->font = NULL; - } - - o->font = evas_font_load(obj->layer->evas, o->cur.fdesc, o->cur.source, - (int)(((double) o->cur.size) * obj->cur.scale)); - if (o->font) - { - 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 - { - o->ascent = 0; - o->descent = 0; - o->max_ascent = 0; - o->max_descent = 0; - } - _evas_object_text_recalc(obj); - o->changed = 1; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_coords_recalc(obj); - if (obj->layer->evas->events_frozen <= 0) - { - if ((!pass) && (!freeze)) - { - 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); -} - -EAPI void -evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (font) *font = ""; - if (size) *size = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (font) *font = ""; - if (size) *size = 0; - return; - MAGIC_CHECK_END(); - if (font) *font = o->cur.font; - if (size) *size = o->cur.size; -} - - -/** - * @internal - * Create a new text layout item from the string and the format. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to use. - * @param str the string to use. - */ -static Evas_Object_Text_Item * -_evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o, - 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_pos = pos; - it->visual_pos = visual_pos; - 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, script); - - if (fi) - { - ENFN->font_text_props_info_create(ENDT, - fi, str + pos, &it->text_props, - o->bidi_par_props, it->text_pos, len); - - ENFN->font_string_size_get(ENDT, - o->font, - &it->text_props, - &it->w, &it->h); - 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)); - return it; -} - -/** - * @internal - * Orders o->items according to the visual position. - * - * @param obj the evas object - * @param o the text object - */ -static void -_evas_object_text_item_order(Evas_Object *obj, Evas_Object_Text *o) -{ - (void) obj; -#ifdef BIDI_SUPPORT - /*FIXME: not very efficient, sort the items arrays. */ - /* Reorder if it's a bidi text */ - if (o->bidi_par_props) - { - Evas_Object_Text_Item *i, *j, *min; - i = o->items; - while (i) - { - min = i; - EINA_INLIST_FOREACH(i, j) - { - if (j->visual_pos < min->visual_pos) - { - min = j; - } - } - if (min != i) - { - o->items = (Evas_Object_Text_Item *) eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min)); - o->items = (Evas_Object_Text_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i)); - } - - i = (Evas_Object_Text_Item *) EINA_INLIST_GET(min)->next; - } - } -#endif - - /* calculate the positions according to the order. */ - { - Evas_Object_Text_Item *it = o->items; - Evas_Coord x = 0; - - while (it) - { - it->x = x; - x += it->adv; - it = (Evas_Object_Text_Item *) EINA_INLIST_GET(it)->next; - } - } -} - -/** - * @internal - * Populates o->items with the items of the text according to text - * - * @param obj the evas object - * @param o the text object - * @param text the text to layout - */ -static void -_evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unicode *text) -{ - EvasBiDiStrIndex *v_to_l = NULL; - size_t pos, visual_pos; - int len = eina_unicode_strlen(text); -#ifdef BIDI_SUPPORT - int par_len = len; - int *segment_idxs = NULL; - if (o->bidi_delimiters) - segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); - evas_bidi_paragraph_props_unref(o->bidi_par_props); - 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; - - while (len > 0) - { - 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); - 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, par_len, pos); -#else - visual_pos = pos; -#endif - _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; - } - } - - _evas_object_text_item_order(obj, o); - - if (v_to_l) free(v_to_l); -} - - -EAPI void -evas_object_text_text_set(Evas_Object *obj, const char *_text) -{ - Evas_Object_Text *o; - int is, was, len; - Eina_Unicode *text; - - 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(); - - if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text))) - return; - text = eina_unicode_utf8_to_unicode(_text, &len); - - if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); - was = evas_object_is_in_output_rect(obj, - obj->layer->evas->pointer.x, - obj->layer->evas->pointer.y, 1, 1); - /* DO II */ - /*Update bidi_props*/ - - if (o->items) _evas_object_text_items_clear(o); - - if ((text) && (*text)) - { - _evas_object_text_layout(obj, o, text); - eina_stringshare_replace(&o->cur.utf8_text, _text); - o->prev.utf8_text = NULL; - } - else - { - eina_stringshare_replace(&o->cur.utf8_text, NULL); - } - if (text) - { - free(text); - text = NULL; - } - _evas_object_text_recalc(obj); - o->changed = 1; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_coords_recalc(obj); - 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); - if (text) free(text); -} - -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) -{ - 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->cur.utf8_text; -} - -EAPI Evas_BiDi_Direction -evas_object_text_direction_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_BIDI_DIRECTION_NEUTRAL; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return EVAS_BIDI_DIRECTION_NEUTRAL; - MAGIC_CHECK_END(); - if (o->items) - { - return o->items->text_props.bidi.dir; - } - return EVAS_BIDI_DIRECTION_NEUTRAL; -} - -EAPI Evas_Coord -evas_object_text_ascent_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - return o->ascent; -} - -EAPI Evas_Coord -evas_object_text_descent_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - return o->descent; -} - -EAPI Evas_Coord -evas_object_text_max_ascent_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - return o->max_ascent; -} - -EAPI Evas_Coord -evas_object_text_max_descent_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - return o->max_descent; -} - -EAPI Evas_Coord -evas_object_text_inset_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - if (!o->font) return 0; - if (!o->items) return 0; - return ENFN->font_inset_get(ENDT, o->font, &o->items->text_props); -} - -EAPI Evas_Coord -evas_object_text_horiz_advance_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - if (!o->font) return 0; - if (!o->items) return 0; - return _evas_object_text_horiz_advance_get(obj, o); -} - -EAPI Evas_Coord -evas_object_text_vert_advance_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return 0; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return 0; - MAGIC_CHECK_END(); - if (!o->font) return 0; - if (!o->items) return o->ascent + o->descent; - return _evas_object_text_vert_advance_get(obj, o); -} - -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) -{ - Evas_Object_Text *o; - int l = 0, r = 0, t = 0, b = 0; - int ret, x = 0, y = 0, w = 0, h = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EINA_FALSE; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return EINA_FALSE; - MAGIC_CHECK_END(); - 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); - evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); - y += o->max_ascent - t; - x -= l; - if (x < 0) - { - w += x; - x = 0; - } - if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x; - if (w < 0) w = 0; - if (y < 0) - { - h += y; - y = 0; - } - if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y; - if (h < 0) h = 0; - if (cx) *cx = x; - if (cy) *cy = y; - if (cw) *cw = w + l + r; - if (ch) *ch = h + t + b; - return ret; -} - - -EAPI int -evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return -1; - MAGIC_CHECK_END(); - 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); -} - -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) -{ - Evas_Object_Text *o; - int l = 0, r = 0, t = 0, b = 0; - int ret, rx = 0, ry = 0, rw = 0, rh = 0; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return -1; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return -1; - MAGIC_CHECK_END(); - 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); - evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); - ry += o->max_ascent - t; - rx -= l; - if (rx < 0) - { - rw += rx; - rx = 0; - } - if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx; - if (rw < 0) rw = 0; - if (ry < 0) - { - rh += ry; - ry = 0; - } - if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry; - if (rh < 0) rh = 0; - if (cx) *cx = rx; - if (cy) *cy = ry; - if (cw) *cw = rw + l + r; - if (ch) *ch = rh + t + b; - return ret; -} - -EAPI void -evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style) -{ - Evas_Object_Text *o; - int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; - - 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(); - if (o->cur.style == style) return; - evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb); - o->cur.style = style; - evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); - if (o->items) - obj->cur.geometry.w += (l - pl) + (r - pr); - else - obj->cur.geometry.w = 0; - obj->cur.geometry.h += (t - pt) + (b - pb); - evas_object_change(obj); - evas_object_clip_dirty(obj); -} - -EAPI Evas_Text_Style_Type -evas_object_text_style_get(const Evas_Object *obj) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return EVAS_TEXT_STYLE_PLAIN; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return EVAS_TEXT_STYLE_PLAIN; - MAGIC_CHECK_END(); - return o->cur.style; -} - -EAPI void -evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - 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(); - if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) && - (o->cur.shadow.b == b) && (o->cur.shadow.a == a)) - return; - o->cur.shadow.r = r; - o->cur.shadow.g = g; - o->cur.shadow.b = b; - o->cur.shadow.a = a; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - if (r) *r = o->cur.shadow.r; - if (g) *g = o->cur.shadow.g; - if (b) *b = o->cur.shadow.b; - if (a) *a = o->cur.shadow.a; -} - -EAPI void -evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - 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(); - if ((o->cur.glow.r == r) && (o->cur.glow.g == g) && - (o->cur.glow.b == b) && (o->cur.glow.a == a)) - return; - o->cur.glow.r = r; - o->cur.glow.g = g; - o->cur.glow.b = b; - o->cur.glow.a = a; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - if (r) *r = o->cur.glow.r; - if (g) *g = o->cur.glow.g; - if (b) *b = o->cur.glow.b; - if (a) *a = o->cur.glow.a; -} - -EAPI void -evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - 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(); - if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) && - (o->cur.glow2.b == b) && (o->cur.glow2.a == a)) - return; - o->cur.glow2.r = r; - o->cur.glow2.g = g; - o->cur.glow2.b = b; - o->cur.glow2.a = a; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - if (r) *r = o->cur.glow2.r; - if (g) *g = o->cur.glow2.g; - if (b) *b = o->cur.glow2.b; - if (a) *a = o->cur.glow2.a; -} - -EAPI void -evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) -{ - 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(); - if ((o->cur.outline.r == r) && (o->cur.outline.g == g) && - (o->cur.outline.b == b) && (o->cur.outline.a == a)) - return; - o->cur.outline.r = r; - o->cur.outline.g = g; - o->cur.outline.b = b; - o->cur.outline.a = a; - o->changed = 1; - evas_object_change(obj); -} - -EAPI void -evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) -{ - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (r) *r = 0; - if (g) *g = 0; - if (b) *b = 0; - if (a) *a = 0; - return; - MAGIC_CHECK_END(); - if (r) *r = o->cur.outline.r; - if (g) *g = o->cur.outline.g; - if (b) *b = o->cur.outline.b; - if (a) *a = o->cur.outline.a; -} - -EAPI void -evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) -{ - int sl = 0, sr = 0, st = 0, sb = 0; - Evas_Object_Text *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - if (l) *l = 0; - if (r) *r = 0; - if (t) *t = 0; - if (b) *b = 0; - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - if (l) *l = 0; - if (r) *r = 0; - if (t) *t = 0; - if (b) *b = 0; - return; - MAGIC_CHECK_END(); - /* use temps to be certain we have initialized values */ - evas_text_style_pad_get(o->cur.style, &sl, &sr, &st, &sb); - if (l) *l = sl; - if (r) *r = sr; - if (t) *t = st; - if (b) *b = sb; -} - - - - -EAPI int -evas_string_char_next_get(const char *str, int pos, int *decoded) -{ - int p, d; - - if (decoded) *decoded = 0; - if ((!str) || (pos < 0)) return 0; - p = pos; - d = eina_unicode_utf8_get_next(str, &p); - if (decoded) *decoded = d; - return p; -} - -EAPI int -evas_string_char_prev_get(const char *str, int pos, int *decoded) -{ - int p, d; - - if (decoded) *decoded = 0; - if ((!str) || (pos < 1)) return 0; - p = pos; - d = eina_unicode_utf8_get_prev(str, &p); - if (decoded) *decoded = d; - return p; -} - -EAPI int -evas_string_char_len_get(const char *str) -{ - if (!str) return 0; - return eina_unicode_utf8_get_len(str); -} - -void -evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b) -{ - int sl = 0, sr = 0, st = 0, sb = 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; - - 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; - } - - 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 (l) sl = *l; - if (r) sr = *r; - if (t) st = *t; - if (b) sb = *b; - - if (sr < maxx) sr = maxx; - if (sl < -minx) sl = -minx; - if (sb < maxy) sb = maxy; - if (st < -miny) st = -miny; - } - - if (l) *l = sl; - if (r) *r = sr; - if (t) *t = st; - if (b) *b = sb; -} - -/* all nice and private */ -static void -evas_object_text_init(Evas_Object *obj) -{ - /* alloc text ob, setup methods and default values */ - obj->object_data = evas_object_text_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0; - obj->cur.geometry.y = 0; - obj->cur.geometry.w = 0; - obj->cur.geometry.h = 0; - obj->cur.layer = 0; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; -} - -static void * -evas_object_text_new(void) -{ - Evas_Object_Text *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 128, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Text); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Text); - o->magic = MAGIC_OBJ_TEXT; - o->prev = o->cur; -#ifdef BIDI_SUPPORT - o->bidi_par_props = evas_bidi_paragraph_props_new(); -#endif - return o; -} - -static void -evas_object_text_free(Evas_Object *obj) -{ - Evas_Object_Text *o; - - /* frees private object data. very simple here */ - o = (Evas_Object_Text *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); - return; - MAGIC_CHECK_END(); - /* free obj */ - if (o->items) _evas_object_text_items_clear(o); - 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.fdesc) evas_font_desc_unref(o->cur.fdesc); - if (o->cur.source) eina_stringshare_del(o->cur.source); - if (o->font) evas_font_free(obj->layer->evas, o->font); -#ifdef BIDI_SUPPORT - evas_bidi_paragraph_props_unref(o->bidi_par_props); -#endif - o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); -} - -static void -evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) -{ - int i, j; - Evas_Object_Text *o; - Evas_Object_Text_Item *it; - const char vals[5][5] = - { - {0, 1, 2, 1, 0}, - {1, 3, 4, 3, 1}, - {2, 4, 5, 4, 2}, - {1, 3, 4, 3, 1}, - {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); - evas_text_style_pad_get(o->cur.style, &sl, NULL, &st, NULL); - ENFN->context_multiplier_unset(output, context); - ENFN->context_render_op_set(output, context, obj->cur.render_op); - /* FIXME: This clipping is just until we fix inset handling correctly. */ - ENFN->context_clip_clip(output, context, - obj->cur.geometry.x + x, - obj->cur.geometry.y + y, - obj->cur.geometry.w, - obj->cur.geometry.h); -/* - ENFN->context_color_set(output, - context, - 230, 160, 30, 100); - ENFN->rectangle_draw(output, - context, - surface, - obj->cur.geometry.x + x, - obj->cur.geometry.y + y, - obj->cur.geometry.w, - obj->cur.geometry.h); - */ -#define COLOR_ONLY_SET(object, sub, col) \ - ENFN->context_color_set(output, context, \ - object->sub.col.r, \ - object->sub.col.g, \ - object->sub.col.b, \ - object->sub.col.a); - -#define COLOR_SET(object, sub, col) \ - if (obj->cur.clipper)\ - ENFN->context_color_set(output, context, \ - ((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \ - ((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \ - ((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \ - ((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \ - else\ - ENFN->context_color_set(output, context, \ - object->sub.col.r, \ - object->sub.col.g, \ - object->sub.col.b, \ - object->sub.col.a); - -#define COLOR_SET_AMUL(object, sub, col, amul) \ - if (obj->cur.clipper) \ - ENFN->context_color_set(output, context, \ - (((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \ - (((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \ - (((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \ - (((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \ - else \ - ENFN->context_color_set(output, context, \ - (((int)object->sub.col.r) * (amul)) / 255, \ - (((int)object->sub.col.g) * (amul)) / 255, \ - (((int)object->sub.col.b) * (amul)) / 255, \ - (((int)object->sub.col.a) * (amul)) / 255); - -#define DRAW_TEXT(ox, oy) \ - if ((o->font) && (it->text_props.len > 0)) \ - ENFN->font_draw(output, \ - context, \ - surface, \ - o->font, \ - obj->cur.geometry.x + x + sl + ox + it->x, \ - obj->cur.geometry.y + y + st + oy + \ - (int) \ - (((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h) - 0.5), \ - obj->cur.geometry.w, \ - obj->cur.geometry.h, \ - obj->cur.geometry.w, \ - obj->cur.geometry.h, \ - &it->text_props); - - /* shadows */ - shad_dst = shad_sz = dx = dy = haveshad = 0; - switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) - { - 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) - { - switch (o->cur.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; - } - dx *= shad_dst; - dy *= shad_dst; - } - } - EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) - { - /* Shadows */ - if (haveshad) - { - switch (shad_sz) - { - case 0: - COLOR_SET(o, cur, shadow); - DRAW_TEXT(dx, dy); - break; - case 2: - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - 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; - } - } - - /* glows */ - if (o->cur.style == EVAS_TEXT_STYLE_GLOW) - { - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - if (vals[i][j] != 0) - { - COLOR_SET_AMUL(o, cur, glow, vals[i][j] * 50); - DRAW_TEXT(i - 2, j - 2); - } - } - } - COLOR_SET(o, cur, glow2); - DRAW_TEXT(-1, 0); - DRAW_TEXT(1, 0); - DRAW_TEXT(0, -1); - DRAW_TEXT(0, 1); - } - - /* outlines */ - if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE) || - (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) || - (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)) - { - COLOR_SET(o, cur, outline); - DRAW_TEXT(-1, 0); - DRAW_TEXT(1, 0); - DRAW_TEXT(0, -1); - DRAW_TEXT(0, 1); - } - else if (o->cur.style == EVAS_TEXT_STYLE_SOFT_OUTLINE) - { - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - if (((i != 2) || (j != 2)) && (vals[i][j] != 0)) - { - COLOR_SET_AMUL(o, cur, outline, vals[i][j] * 50); - DRAW_TEXT(i - 2, j - 2); - } - } - } - } - - /* normal text */ - COLOR_ONLY_SET(obj, cur.cache, clip); - DRAW_TEXT(0, 0); - } -} - -static void -evas_object_text_render_pre(Evas_Object *obj) -{ - Evas_Object_Text *o; - int is_v, was_v; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before - rendering. This could mean loading the image data, retrieving it from - elsewhere, decoding video etc. - Then when this is done the object needs to figure if it changed and - if so what and where and add the appropriate redraw rectangles */ - o = (Evas_Object_Text *)(obj->object_data); - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* now figure what changed and add draw rects - if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, - obj, is_v, was_v); - goto done; - } - 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); - goto done; - } - /* its not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); - /* if we restacked (layer or just within a layer) and dont clip anyone */ - if (obj->restack) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - /* if it changed geometry - and obviously not visibility or color - calculate differences since we have a constant color fill - we really only need to update the differences */ - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - if (obj->cur.render_op != obj->prev.render_op) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - if (obj->cur.scale != obj->prev.scale) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - if (o->changed) - { - if ((o->cur.size != o->prev.size) || - ((o->cur.font != o->prev.font)) || - ((o->cur.utf8_text != o->prev.utf8_text)) || - ((o->cur.style != o->prev.style)) || - ((o->cur.shadow.r != o->prev.shadow.r)) || - ((o->cur.shadow.g != o->prev.shadow.g)) || - ((o->cur.shadow.b != o->prev.shadow.b)) || - ((o->cur.shadow.a != o->prev.shadow.a)) || - ((o->cur.outline.r != o->prev.outline.r)) || - ((o->cur.outline.g != o->prev.outline.g)) || - ((o->cur.outline.b != o->prev.outline.b)) || - ((o->cur.outline.a != o->prev.outline.a)) || - ((o->cur.glow.r != o->prev.glow.r)) || - ((o->cur.glow.g != o->prev.glow.g)) || - ((o->cur.glow.b != o->prev.glow.b)) || - ((o->cur.glow.a != o->prev.glow.a)) || - ((o->cur.glow2.r != o->prev.glow2.r)) || - ((o->cur.glow2.g != o->prev.glow2.g)) || - ((o->cur.glow2.b != o->prev.glow2.b)) || - ((o->cur.glow2.a != o->prev.glow2.a))) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, - obj); - goto done; - } - } - done: - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, - obj, is_v, was_v); -} - -static void -evas_object_text_render_post(Evas_Object *obj) -{ - Evas_Object_Text *o; - - /* this moves the current data to the previous state parts of the object - in whatever way is safest for the object. also if we don't need object - data anymore we can free it if the object deems this is a good idea */ - o = (Evas_Object_Text *)(obj->object_data); - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; - o->prev = o->cur; - o->changed = 0; -} - -static unsigned int -evas_object_text_id_get(Evas_Object *obj) -{ - Evas_Object_Text *o; - - o = (Evas_Object_Text *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_TEXT; -} - -static unsigned int -evas_object_text_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Text *o; - - o = (Evas_Object_Text *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - -static void * -evas_object_text_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Text *o; - - o = (Evas_Object_Text *)(obj->object_data); - if (!o) return NULL; - return o->font; -} - -static int -evas_object_text_is_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object is - currently fully opaque over the entire gradient it occupies */ - return 0; -} - -static int -evas_object_text_was_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object was - currently fully opaque over the entire gradient it occupies */ - return 0; -} - -static void -evas_object_text_scale_update(Evas_Object *obj) -{ - Evas_Object_Text *o; - int size; - const char *font; - - o = (Evas_Object_Text *)(obj->object_data); - font = eina_stringshare_add(o->cur.font); - size = o->cur.size; - if (o->cur.font) eina_stringshare_del(o->cur.font); - o->cur.font = NULL; - o->prev.font = NULL; - o->cur.size = 0; - o->prev.size = 0; - evas_object_text_font_set(obj, font, size); -} - -void -_evas_object_text_rehint(Evas_Object *obj) -{ - Evas_Object_Text *o; - int is, was; - - o = (Evas_Object_Text *)(obj->object_data); - if (!o->font) return; -#ifdef EVAS_FRAME_QUEUING - evas_common_pipe_op_text_flush((RGBA_Font *) o->font); -#endif - 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, - obj->layer->evas->pointer.y, 1, 1); - /* DO II */ - _evas_object_text_recalc(obj); - o->changed = 1; - evas_object_change(obj); - evas_object_clip_dirty(obj); - evas_object_coords_recalc(obj); - 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); -} - -static void -_evas_object_text_recalc(Evas_Object *obj) -{ - Evas_Object_Text *o; - Eina_Unicode *text = NULL; - o = (Evas_Object_Text *)(obj->object_data); - - if (o->items) _evas_object_text_items_clear(o); - if (o->cur.utf8_text) - text = eina_unicode_utf8_to_unicode(o->cur.utf8_text, - NULL); - - if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); - - _evas_object_text_layout(obj, o, text); - - if (text) free(text); - - if ((o->font) && (o->items)) - { - int w, h; - int l = 0, r = 0, t = 0, b = 0; - - w = _evas_object_text_horiz_advance_get(obj, o); - h = _evas_object_text_vert_advance_get(obj, o); - evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); - obj->cur.geometry.w = w + l + r; - obj->cur.geometry.h = h + t + b; -//// obj->cur.cache.geometry.validity = 0; - } - else - { - int t = 0, b = 0; - - evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b); - obj->cur.geometry.w = 0; - obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b; -//// obj->cur.cache.geometry.validity = 0; - } -} - diff --git a/libraries/evas/src/lib/canvas/evas_object_textblock.c b/libraries/evas/src/lib/canvas/evas_object_textblock.c deleted file mode 100644 index ee07e20..0000000 --- a/libraries/evas/src/lib/canvas/evas_object_textblock.c +++ /dev/null @@ -1,10052 +0,0 @@ -/** - * @internal - * @section Evas_Object_Textblock_Internal Internal Textblock Object Tutorial - * - * This explains the internal design of the Evas Textblock Object, it's assumed - * that the reader of this section has already read @ref Evas_Object_Textblock_Tutorial "Textblock's usage docs.". - * - * @subsection textblock_internal_intro Introduction - * There are two main parts to the textblock object, the first being the node - * system, and the second being the layout system. The former is just an - * internal representation of the markup text, while the latter is the internal - * visual representation of the text (i.e positioning, sizing, fonts and etc). - * - * @subsection textblock_nodes The Nodes system - * The nodes mechanism consists of two main data types: - * ::Evas_Object_Textblock_Node_Text and ::Evas_Object_Textblock_Node_Format - * the former is for Text nodes and the latter is for format nodes. - * There's always at least one text node, even if there are only formats. - * - * @subsection textblock_nodes_text Text nodes - * Each text node is essentially a paragraph, it includes an @ref Eina_UStrbuf - * that stores the actual paragraph text, a utf8 string to store the paragraph - * text in utf8 (which is not used internally at all), A pointer to it's - * main @ref textblock_nodes_format_internal "Format Node" and the paragraph's - * @ref evas_bidi_props "BiDi properties". The pointer to the format node may be - * NULL if there's no format node anywhere before the end of the text node, - * not even in previous text nodes. If not NULL, it points to the first format - * node pointing to text inside of the text node, or if there is none, it points - * to the previous's text nodes format node. Each paragraph has a format node - * representing a paragraph separator pointing to it's last position except - * for the last paragraph, which has no such constraint. This constraint - * happens because text nodes are paragraphs and paragraphs are delimited by - * paragraph separators. - * - * @subsection textblock_nodes_format_internal Format Nodes - Internal - * Each format node stores a group of format information, for example the - * markup: \ will all be inserted - * inside the same format node, altohugh it consists of different formatting - * commands. - * Each node has a pointer to it's text node, this pointer is NEVER NULL, even - * if there's only one format, and no text, a text node is created. Each format - * node includes an offset from the last format node of the same text node. For - * example, the markup "012" will create two format nodes, the first - * having an offset of 1 and the second an offset of 2. Each format node also - * includes a @ref Eina_Strbuf that includes the textual representation of the - * format, and a boolean stating if the format is a visible format or not, see - * @ref textblock_nodes_format_visible - * - * @subsection textblock_nodes_format_visible Visible Format Nodes - * There are two types of format nodes, visible and invisible. They are the same - * in every way, except for the representation in the text node. While invisible - * format nodes have no representation in the text node, the visible ones do. - * The Uniceode object replacement character (0xFFFC) is inserted to every place - * a visible format node points to. This makes it very easy to treat visible - * formats as items in the text, both for BiDi purposes and cursor handling - * purposes. - * Here are a few example visible an invisible formats: - * Visible: newline char, tab, paragraph separator and an embedded item. - * Invisible: setting the color, font or alignment of the text. - * - * @subsection textblock_layout The layout system - * @todo write @ref textblock_layout - */ -#include "evas_common.h" -#include "evas_private.h" -#include - -#ifdef HAVE_LINEBREAK -#include "linebreak.h" -#include "wordbreak.h" -#endif - -/* save typing */ -#define ENFN obj->layer->evas->engine.func -#define ENDT obj->layer->evas->engine.data.output - -/* private magic number for textblock objects */ -static const char o_type[] = "textblock"; - -/* The char to be inserted instead of visible formats */ -#define _REPLACEMENT_CHAR 0xFFFC -#define _PARAGRAPH_SEPARATOR 0x2029 -#define _NEWLINE '\n' -#define _TAB '\t' - -#define _REPLACEMENT_CHAR_UTF8 "\xEF\xBF\xBC" -#define _PARAGRAPH_SEPARATOR_UTF8 "\xE2\x80\xA9" -#define _NEWLINE_UTF8 "\n" -#define _TAB_UTF8 "\t" -#define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \ - (((ch) == _REPLACEMENT_CHAR) || \ - ((ch) == _NEWLINE) || \ - ((ch) == _TAB) || \ - ((ch) == _PARAGRAPH_SEPARATOR)) - -/* private struct for textblock object internal data */ -/** - * @internal - * @typedef Evas_Object_Textblock - * The actual textblock object. - */ -typedef struct _Evas_Object_Textblock Evas_Object_Textblock; -/** - * @internal - * @typedef Evas_Object_Style_Tag - * The structure used for finding style tags. - */ -typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag; -/** - * @internal - * @typedef Evas_Object_Style_Tag - * The structure used for finding style tags. - */ -typedef struct _Evas_Object_Style_Tag_Base Evas_Object_Style_Tag_Base; -/** - * @internal - * @typedef Evas_Object_Textblock_Node_Text - * A text node. - */ -typedef struct _Evas_Object_Textblock_Node_Text Evas_Object_Textblock_Node_Text; -/* - * Defined in Evas.h -typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format; -*/ - -/** - * @internal - * @typedef Evas_Object_Textblock_Paragraph - * A layouting paragraph. - */ -typedef struct _Evas_Object_Textblock_Paragraph Evas_Object_Textblock_Paragraph; -/** - * @internal - * @typedef Evas_Object_Textblock_Line - * A layouting line. - */ -typedef struct _Evas_Object_Textblock_Line Evas_Object_Textblock_Line; -/** - * @internal - * @typedef Evas_Object_Textblock_Item - * A layouting item. - */ -typedef struct _Evas_Object_Textblock_Item Evas_Object_Textblock_Item; -/** - * @internal - * @typedef Evas_Object_Textblock_Item - * A layouting text item. - */ -typedef struct _Evas_Object_Textblock_Text_Item Evas_Object_Textblock_Text_Item; -/** - * @internal - * @typedef Evas_Object_Textblock_Format_Item - * A layouting format item. - */ -typedef struct _Evas_Object_Textblock_Format_Item Evas_Object_Textblock_Format_Item; -/** - * @internal - * @typedef Evas_Object_Textblock_Format - * A textblock format. - */ -typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format; - -/** - * @internal - * @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 MOVE_NEXT_UNTIL(limit, ind) \ - do \ - { \ - if ((ind) < (limit)) \ - (ind)++; \ - } \ - while (0) - -/** - * @internal - * @def GET_ITEM_TEXT(ti) - * Returns a const reference to the text of the ti (not null terminated). - */ -#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) -/** - * @internal - * @def _FORMAT_IS_CLOSER_OF(base, closer, closer_len) - * Returns true if closer is the closer of base. - */ -#define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \ - (!strncmp(base, closer, closer_len) && \ - (!base[closer_len] || \ - (base[closer_len] == '=') || \ - _is_white(base[closer_len]))) - -/*FIXME: document the structs and struct items. */ -struct _Evas_Object_Style_Tag_Base -{ - char *tag; - char *replace; - size_t tag_len; - size_t replace_len; -}; - -struct _Evas_Object_Style_Tag -{ - EINA_INLIST; - Evas_Object_Style_Tag_Base tag; -}; - -struct _Evas_Object_Textblock_Node_Text -{ - EINA_INLIST; - Eina_UStrbuf *unicode; - char *utf8; - Evas_Object_Textblock_Node_Format *format_node; - Evas_Object_Textblock_Paragraph *par; - Eina_Bool dirty : 1; - Eina_Bool is_new : 1; -}; - -struct _Evas_Object_Textblock_Node_Format -{ - EINA_INLIST; - const char *format; - const char *orig_format; - Evas_Object_Textblock_Node_Text *text_node; - size_t offset; - unsigned char anchor : 2; - Eina_Bool opener : 1; - Eina_Bool own_closer : 1; - Eina_Bool visible : 1; - Eina_Bool format_change : 1; - Eina_Bool is_new : 1; -}; - -/* The default tags to use */ -static const Evas_Object_Style_Tag_Base default_tags[] = { - { "b", "+ font_weight=Bold", 1, 18 }, - { "i", "+ font_style=Italic", 1, 19 }}; - -#define ANCHOR_NONE 0 -#define ANCHOR_A 1 -#define ANCHOR_ITEM 2 - -/** - * @internal - * @def _NODE_TEXT(x) - * A convinience macro for casting to a text node. - */ -#define _NODE_TEXT(x) ((Evas_Object_Textblock_Node_Text *) (x)) -/** - * @internal - * @def _NODE_FORMAT(x) - * A convinience macro for casting to a format node. - */ -#define _NODE_FORMAT(x) ((Evas_Object_Textblock_Node_Format *) (x)) -/** - * @internal - * @def _ITEM(x) - * A convinience macro for casting to a generic item. - */ -#define _ITEM(x) ((Evas_Object_Textblock_Item *) (x)) -/** - * @internal - * @def _ITEM_TEXT(x) - * A convinience macro for casting to a text item. - */ -#define _ITEM_TEXT(x) ((Evas_Object_Textblock_Text_Item *) (x)) -/** - * @internal - * @def _ITEM_FORMAT(x) - * A convinience macro for casting to a format item. - */ -#define _ITEM_FORMAT(x) ((Evas_Object_Textblock_Format_Item *) (x)) - -struct _Evas_Object_Textblock_Paragraph -{ - EINA_INLIST; - Evas_Object_Textblock_Line *lines; - Evas_Object_Textblock_Node_Text *text_node; - Eina_List *logical_items; - 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 rendered : 1; -}; - -struct _Evas_Object_Textblock_Line -{ - EINA_INLIST; - Evas_Object_Textblock_Item *items; - Evas_Object_Textblock_Paragraph *par; - Evas_Coord x, y, w, h; - int baseline; - int line_no; -}; - -typedef enum _Evas_Textblock_Item_Type -{ - EVAS_TEXTBLOCK_ITEM_TEXT, - EVAS_TEXTBLOCK_ITEM_FORMAT, -} Evas_Textblock_Item_Type; - -struct _Evas_Object_Textblock_Item -{ - EINA_INLIST; - Evas_Textblock_Item_Type type; - Evas_Object_Textblock_Node_Text *text_node; - Evas_Object_Textblock_Format *format; - size_t text_pos; -#ifdef BIDI_SUPPORT - size_t visual_pos; -#endif - Evas_Coord adv, x, w, h; - Eina_Bool merge : 1; /* Indicates whether this - item should merge to the - previous item or not */ - Eina_Bool visually_deleted : 1; - /* Indicates whether this - item is used in the visual - layout or not. */ -}; - -struct _Evas_Object_Textblock_Text_Item -{ - Evas_Object_Textblock_Item parent; - Evas_Text_Props text_props; - Evas_Coord inset; - Evas_Coord x_adjustment; /* Used to indicate by how - much we adjusted sizes */ -}; - -struct _Evas_Object_Textblock_Format_Item -{ - Evas_Object_Textblock_Item parent; - Evas_BiDi_Direction bidi_dir; - const char *item; - int y; - unsigned char vsize : 2; - unsigned char size : 2; - Eina_Bool formatme : 1; -}; - -struct _Evas_Object_Textblock_Format -{ - Evas_Object_Textblock_Node_Format *fnode; - double halign; - double valign; - struct { - Evas_Font_Description *fdesc; - const char *source; - Evas_Font_Set *font; - Evas_Font_Size size; - } font; - struct { - struct { - unsigned char r, g, b, a; - } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, - strikethrough; - } color; - struct { - int l, r; - } margin; - int ref; - int tabstops; - int linesize; - int linegap; - int underline_dash_width; - int underline_dash_gap; - double linerelsize; - double linerelgap; - double linefill; - double ellipsis; - unsigned char style; - 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 underline_dash : 1; - Eina_Bool strikethrough : 1; - Eina_Bool backing : 1; - Eina_Bool password : 1; - Eina_Bool halign_auto : 1; -}; - -struct _Evas_Textblock_Style -{ - const char *style_text; - char *default_tag; - Evas_Object_Style_Tag *tags; - Eina_List *objects; - Eina_Bool delete_me : 1; -}; - -struct _Evas_Textblock_Cursor -{ - Evas_Object *obj; - size_t pos; - Evas_Object_Textblock_Node_Text *node; -}; - -/* Size of the index array */ -#define TEXTBLOCK_PAR_INDEX_SIZE 10 -struct _Evas_Object_Textblock -{ - DATA32 magic; - Evas_Textblock_Style *style; - Evas_Textblock_Style *style_user; - Evas_Textblock_Cursor *cursor; - Eina_List *cursors; - Evas_Object_Textblock_Node_Text *text_nodes; - Evas_Object_Textblock_Node_Format *format_nodes; - - int num_paragraphs; - Evas_Object_Textblock_Paragraph *paragraphs; - Evas_Object_Textblock_Paragraph *par_index[TEXTBLOCK_PAR_INDEX_SIZE]; - - Evas_Object_Textblock_Text_Item *ellip_ti; - Eina_List *anchors_a; - Eina_List *anchors_item; - int last_w, last_h; - struct { - int l, r, t, b; - } style_pad; - double valign; - char *markup_text; - void *engine_data; - const char *repch; - const char *bidi_delimiters; - struct { - int w, h; - Eina_Bool valid : 1; - } formatted, native; - 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 legacy_newline : 1; -}; - -/* private methods for textblock objects */ -static void evas_object_textblock_init(Evas_Object *obj); -static void *evas_object_textblock_new(void); -static void evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); -static void evas_object_textblock_free(Evas_Object *obj); -static void evas_object_textblock_render_pre(Evas_Object *obj); -static void evas_object_textblock_render_post(Evas_Object *obj); - -static unsigned int evas_object_textblock_id_get(Evas_Object *obj); -static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj); -static void *evas_object_textblock_engine_data_get(Evas_Object *obj); - -static int evas_object_textblock_is_opaque(Evas_Object *obj); -static int evas_object_textblock_was_opaque(Evas_Object *obj); - -static void evas_object_textblock_coords_recalc(Evas_Object *obj); - -static void evas_object_textblock_scale_update(Evas_Object *obj); - -static const Evas_Object_Func object_func = -{ - /* methods (compulsory) */ - evas_object_textblock_free, - evas_object_textblock_render, - evas_object_textblock_render_pre, - evas_object_textblock_render_post, - evas_object_textblock_id_get, - evas_object_textblock_visual_id_get, - evas_object_textblock_engine_data_get, - /* these are optional. NULL = nothing */ - NULL, - NULL, - NULL, - NULL, - evas_object_textblock_is_opaque, - evas_object_textblock_was_opaque, - NULL, - NULL, - evas_object_textblock_coords_recalc, - evas_object_textblock_scale_update, - NULL, - NULL, - NULL -}; - -/* the actual api call to add a textblock */ - -#define TB_HEAD() \ - Evas_Object_Textblock *o; \ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ - return; \ - MAGIC_CHECK_END(); \ - o = (Evas_Object_Textblock *)(obj->object_data); \ - MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ - return; \ - MAGIC_CHECK_END(); - -#define TB_HEAD_RETURN(x) \ - Evas_Object_Textblock *o; \ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ - return (x); \ - MAGIC_CHECK_END(); \ - o = (Evas_Object_Textblock *)(obj->object_data); \ - MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ - return (x); \ - MAGIC_CHECK_END(); - - - -static Eina_Bool _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur); -static void _evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n); -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 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 *o, Evas_Object_Textblock_Node_Format *n); -static void _evas_textblock_node_text_free(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); - -/* styles */ -/** - * @internal - * Clears the textblock style passed except for the style_text which is replaced. - * @param ts The ts to be cleared. Must not be NULL. - * @param style_text the style's text. - */ -static void -_style_replace(Evas_Textblock_Style *ts, const char *style_text) -{ - eina_stringshare_replace(&ts->style_text, style_text); - if (ts->default_tag) free(ts->default_tag); - while (ts->tags) - { - Evas_Object_Style_Tag *tag; - - tag = (Evas_Object_Style_Tag *)ts->tags; - ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - free(tag->tag.tag); - free(tag->tag.replace); - free(tag); - } - ts->default_tag = NULL; - ts->tags = NULL; -} - -/** - * @internal - * Clears the textblock style passed. - * @param ts The ts to be cleared. Must not be NULL. - */ -static void -_style_clear(Evas_Textblock_Style *ts) -{ - _style_replace(ts, NULL); -} - -/** - * @internal - * Searches inside the tags stored in the style for the tag matching s. - * @param ts The ts to be cleared. Must not be NULL. - * @param s The tag to be matched. - * @param tag_len the length of the tag string. - * @param[out] replace_len The length of the replcaement found. - Must not be NULL. - * @return The replacement string found. - */ -static inline const char * -_style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) -{ - Evas_Object_Style_Tag *tag; - - /* Try the style tags */ - EINA_INLIST_FOREACH(ts->tags, tag) - { - if (tag->tag.tag_len != tag_len) continue; - if (!strncmp(tag->tag.tag, s, tag_len)) - { - *replace_len = tag->tag.replace_len; - return tag->tag.replace; - } - } - - /* Try the default tags */ - { - size_t i; - const Evas_Object_Style_Tag_Base *btag; - for (btag = default_tags, i = 0 ; - i < (sizeof(default_tags) / sizeof(default_tags[0])) ; - btag++, i++) - { - if (btag->tag_len != tag_len) continue; - if (!strncmp(btag->tag, s, tag_len)) - { - *replace_len = btag->replace_len; - return btag->replace; - } - } - } - - *replace_len = 0; - return NULL; -} - -/** - * @internal - * Clears all the nodes (text and format) of the textblock object. - * @param obj The evas object, must not be NULL. - */ -static void -_nodes_clear(const Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - while (o->text_nodes) - { - Evas_Object_Textblock_Node_Text *n; - - n = o->text_nodes; - o->text_nodes = _NODE_TEXT(eina_inlist_remove( - EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); - _evas_textblock_node_text_free(n); - } - while (o->format_nodes) - { - Evas_Object_Textblock_Node_Format *n; - - 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(o, n); - } -} - -/** - * @internal - * Unrefs and frees (if needed) a textblock format. - * @param obj The Evas_Object, Must not be NULL. - * @param fmt the format to be cleaned, must not be NULL. - */ -static void -_format_unref_free(const Evas_Object *obj, Evas_Object_Textblock_Format *fmt) -{ - fmt->ref--; - if (fmt->ref > 0) return; - if (fmt->font.fdesc) evas_font_desc_unref(fmt->font.fdesc); - if (fmt->font.source) eina_stringshare_del(fmt->font.source); - evas_font_free(obj->layer->evas, fmt->font.font); - free(fmt); -} - -/** - * @internal - * Free a layout item - * @param obj The evas object, must not be NULL. - * @param ln the layout line on which the item is in, must not be NULL. - * @param it the layout item to be freed - */ -static void -_item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_Textblock_Item *it) -{ - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - - evas_common_text_props_content_unref(&ti->text_props); - } - else - { - Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); - - if (fi->item) eina_stringshare_del(fi->item); - } - _format_unref_free(obj, it->format); - if (ln) - { - ln->items = (Evas_Object_Textblock_Item *) eina_inlist_remove( - EINA_INLIST_GET(ln->items), EINA_INLIST_GET(ln->items)); - } - free(it); -} - -/** - * @internal - * Free a layout line. - * @param obj The evas object, must not be NULL. - * @param ln the layout line to be freed, must not be NULL. - */ -static void -_line_free(Evas_Object_Textblock_Line *ln) -{ - /* Items are freed from the logical list, except for the ellip item */ - if (ln) free(ln); -} - -/* table of html escapes (that i can find) this should be ordered with the - * most common first as it's a linear search to match - no hash for this. - * - * these are stored as one large string and one additional array that - * contains the offsets to the tokens for space efficiency. - */ -/** - * @internal - * @var escape_strings[] - * This string consists of NULL terminated pairs of strings, the first of - * every pair is an escape and the second is the value of the escape. - */ -static const char escape_strings[] = -/* most common escaped stuff */ -""\0" "\x22\0" -"&\0" "\x26\0" -"<\0" "\x3c\0" -">\0" "\x3e\0" -/* all the rest */ -" \0" "\xc2\xa0\0" -"¡\0" "\xc2\xa1\0" -"¢\0" "\xc2\xa2\0" -"£\0" "\xc2\xa3\0" -"¤\0" "\xc2\xa4\0" -"¥\0" "\xc2\xa5\0" -"¦\0" "\xc2\xa6\0" -"§\0" "\xc2\xa7\0" -"¨\0" "\xc2\xa8\0" -"©\0" "\xc2\xa9\0" -"ª\0" "\xc2\xaa\0" -"«\0" "\xc2\xab\0" -"¬\0" "\xc2\xac\0" -"®\0" "\xc2\xae\0" -"¯\0" "\xc2\xaf\0" -"°\0" "\xc2\xb0\0" -"±\0" "\xc2\xb1\0" -"²\0" "\xc2\xb2\0" -"³\0" "\xc2\xb3\0" -"´\0" "\xc2\xb4\0" -"µ\0" "\xc2\xb5\0" -"¶\0" "\xc2\xb6\0" -"·\0" "\xc2\xb7\0" -"¸\0" "\xc2\xb8\0" -"¹\0" "\xc2\xb9\0" -"º\0" "\xc2\xba\0" -"»\0" "\xc2\xbb\0" -"¼\0" "\xc2\xbc\0" -"½\0" "\xc2\xbd\0" -"¾\0" "\xc2\xbe\0" -"¿\0" "\xc2\xbf\0" -"À\0" "\xc3\x80\0" -"Á\0" "\xc3\x81\0" -"Â\0" "\xc3\x82\0" -"Ã\0" "\xc3\x83\0" -"Ä\0" "\xc3\x84\0" -"Å\0" "\xc3\x85\0" -"&Aelig;\0" "\xc3\x86\0" -"Ç\0" "\xc3\x87\0" -"È\0" "\xc3\x88\0" -"É\0" "\xc3\x89\0" -"Ê\0" "\xc3\x8a\0" -"Ë\0" "\xc3\x8b\0" -"Ì\0" "\xc3\x8c\0" -"Í\0" "\xc3\x8d\0" -"Î\0" "\xc3\x8e\0" -"Ï\0" "\xc3\x8f\0" -"&Eth;\0" "\xc3\x90\0" -"Ñ\0" "\xc3\x91\0" -"Ò\0" "\xc3\x92\0" -"Ó\0" "\xc3\x93\0" -"Ô\0" "\xc3\x94\0" -"Õ\0" "\xc3\x95\0" -"Ö\0" "\xc3\x96\0" -"×\0" "\xc3\x97\0" -"Ø\0" "\xc3\x98\0" -"Ù\0" "\xc3\x99\0" -"Ú\0" "\xc3\x9a\0" -"Û\0" "\xc3\x9b\0" -"Ý\0" "\xc3\x9d\0" -"&Thorn;\0" "\xc3\x9e\0" -"ß\0" "\xc3\x9f\0" -"à\0" "\xc3\xa0\0" -"á\0" "\xc3\xa1\0" -"â\0" "\xc3\xa2\0" -"ã\0" "\xc3\xa3\0" -"ä\0" "\xc3\xa4\0" -"å\0" "\xc3\xa5\0" -"æ\0" "\xc3\xa6\0" -"ç\0" "\xc3\xa7\0" -"è\0" "\xc3\xa8\0" -"é\0" "\xc3\xa9\0" -"ê\0" "\xc3\xaa\0" -"ë\0" "\xc3\xab\0" -"ì\0" "\xc3\xac\0" -"í\0" "\xc3\xad\0" -"î\0" "\xc3\xae\0" -"ï\0" "\xc3\xaf\0" -"ð\0" "\xc3\xb0\0" -"ñ\0" "\xc3\xb1\0" -"ò\0" "\xc3\xb2\0" -"ó\0" "\xc3\xb3\0" -"ô\0" "\xc3\xb4\0" -"õ\0" "\xc3\xb5\0" -"ö\0" "\xc3\xb6\0" -"÷\0" "\xc3\xb7\0" -"ø\0" "\xc3\xb8\0" -"ù\0" "\xc3\xb9\0" -"ú\0" "\xc3\xba\0" -"û\0" "\xc3\xbb\0" -"ü\0" "\xc3\xbc\0" -"ý\0" "\xc3\xbd\0" -"þ\0" "\xc3\xbe\0" -"ÿ\0" "\xc3\xbf\0" -"α\0" "\xce\x91\0" -"β\0" "\xce\x92\0" -"γ\0" "\xce\x93\0" -"δ\0" "\xce\x94\0" -"ε\0" "\xce\x95\0" -"ζ\0" "\xce\x96\0" -"η\0" "\xce\x97\0" -"θ\0" "\xce\x98\0" -"ι\0" "\xce\x99\0" -"κ\0" "\xce\x9a\0" -"λ\0" "\xce\x9b\0" -"μ\0" "\xce\x9c\0" -"ν\0" "\xce\x9d\0" -"ξ\0" "\xce\x9e\0" -"ο\0" "\xce\x9f\0" -"π\0" "\xce\xa0\0" -"ρ\0" "\xce\xa1\0" -"σ\0" "\xce\xa3\0" -"τ\0" "\xce\xa4\0" -"υ\0" "\xce\xa5\0" -"φ\0" "\xce\xa6\0" -"χ\0" "\xce\xa7\0" -"ψ\0" "\xce\xa8\0" -"ω\0" "\xce\xa9\0" -"…\0" "\xe2\x80\xa6\0" -"€\0" "\xe2\x82\xac\0" -"←\0" "\xe2\x86\x90\0" -"↑\0" "\xe2\x86\x91\0" -"→\0" "\xe2\x86\x92\0" -"↓\0" "\xe2\x86\x93\0" -"↔\0" "\xe2\x86\x94\0" -"←\0" "\xe2\x87\x90\0" -"→\0" "\xe2\x87\x92\0" -"∀\0" "\xe2\x88\x80\0" -"∃\0" "\xe2\x88\x83\0" -"∇\0" "\xe2\x88\x87\0" -"∏\0" "\xe2\x88\x8f\0" -"∑\0" "\xe2\x88\x91\0" -"∧\0" "\xe2\x88\xa7\0" -"∨\0" "\xe2\x88\xa8\0" -"∫\0" "\xe2\x88\xab\0" -"≠\0" "\xe2\x89\xa0\0" -"≡\0" "\xe2\x89\xa1\0" -"⊕\0" "\xe2\x8a\x95\0" -"⊥\0" "\xe2\x8a\xa5\0" -"†\0" "\xe2\x80\xa0\0" -"‡\0" "\xe2\x80\xa1\0" -"•\0" "\xe2\x80\xa2\0" -; - -EVAS_MEMPOOL(_mp_obj); - -/** - * @internal - * Checks if a char is a whitespace. - * @param c the unicode codepoint. - * @return EINA_TRUE if the unicode codepoint is a whitespace, EINA_FALSE otherwise. - */ -static Eina_Bool -_is_white(Eina_Unicode c) -{ - /* - * unicode list of whitespace chars - * - * 0009..000D .. - * 0020 SPACE - * 0085 - * 00A0 NO-BREAK SPACE - * 1680 OGHAM SPACE MARK - * 180E MONGOLIAN VOWEL SEPARATOR - * 2000..200A EN QUAD..HAIR SPACE - * 2028 LINE SEPARATOR - * 2029 PARAGRAPH SEPARATOR - * 202F NARROW NO-BREAK SPACE - * 205F MEDIUM MATHEMATICAL SPACE - * 3000 IDEOGRAPHIC SPACE - */ - if ( - (c == 0x20) || - ((c >= 0x9) && (c <= 0xd)) || - (c == 0x85) || - (c == 0xa0) || - (c == 0x1680) || - (c == 0x180e) || - ((c >= 0x2000) && (c <= 0x200a)) || - (c == 0x2028) || - (c == 0x2029) || - (c == 0x202f) || - (c == 0x205f) || - (c == 0x3000) - ) - return EINA_TRUE; - return EINA_FALSE; -} - -/** - * @internal - * Prepends the text between s and p to the main cursor of the object. - * - * @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_Textblock_Cursor *cur, const char *s, const char *p) -{ - if ((s) && (p > s)) - { - char *ts; - - ts = alloca(p - s + 1); - strncpy(ts, s, p - s); - ts[p - s] = 0; - evas_textblock_cursor_text_prepend(cur, ts); - } -} - - -/** - * @internal - * Returns the numeric value of HEX chars for example for ch = 'A' - * the function will return 10. - * - * @param ch The HEX char. - * @return numeric value of HEX. - */ -static int -_hex_string_get(char ch) -{ - if ((ch >= '0') && (ch <= '9')) return (ch - '0'); - else if ((ch >= 'A') && (ch <= 'F')) return (ch - 'A' + 10); - else if ((ch >= 'a') && (ch <= 'f')) return (ch - 'a' + 10); - return 0; -} - -/** - * @internal - * Parses a string of one of the formas: - * 1. "#RRGGBB" - * 2. "#RRGGBBAA" - * 3. "#RGB" - * 4. "#RGBA" - * To the rgba values. - * - * @param[in] str The string to parse - NOT NULL. - * @param[out] r The Red value - NOT NULL. - * @param[out] g The Green value - NOT NULL. - * @param[out] b The Blue value - NOT NULL. - * @param[out] a The Alpha value - NOT NULL. - */ -static void -_format_color_parse(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) -{ - int slen; - - slen = strlen(str); - *r = *g = *b = *a = 0; - - if (slen == 7) /* #RRGGBB */ - { - *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); - *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); - *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); - *a = 0xff; - } - else if (slen == 9) /* #RRGGBBAA */ - { - *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); - *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); - *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); - *a = (_hex_string_get(str[7]) << 4) | (_hex_string_get(str[8])); - } - else if (slen == 4) /* #RGB */ - { - *r = _hex_string_get(str[1]); - *r = (*r << 4) | *r; - *g = _hex_string_get(str[2]); - *g = (*g << 4) | *g; - *b = _hex_string_get(str[3]); - *b = (*b << 4) | *b; - *a = 0xff; - } - else if (slen == 5) /* #RGBA */ - { - *r = _hex_string_get(str[1]); - *r = (*r << 4) | *r; - *g = _hex_string_get(str[2]); - *g = (*g << 4) | *g; - *b = _hex_string_get(str[3]); - *b = (*b << 4) | *b; - *a = _hex_string_get(str[4]); - *a = (*a << 4) | *a; - } - *r = (*r * *a) / 255; - *g = (*g * *a) / 255; - *b = (*b * *a) / 255; -} - -/* The refcount for the formats. */ -static int format_refcount = 0; -/* Holders for the stringshares */ -static const char *fontstr = NULL; -static const char *font_fallbacksstr = NULL; -static const char *font_sizestr = NULL; -static const char *font_sourcestr = NULL; -static const char *font_weightstr = NULL; -static const char *font_stylestr = NULL; -static const char *font_widthstr = NULL; -static const char *langstr = NULL; -static const char *colorstr = NULL; -static const char *underline_colorstr = NULL; -static const char *underline2_colorstr = NULL; -static const char *underline_dash_colorstr = NULL; -static const char *outline_colorstr = NULL; -static const char *shadow_colorstr = NULL; -static const char *glow_colorstr = NULL; -static const char *glow2_colorstr = NULL; -static const char *backing_colorstr = NULL; -static const char *strikethrough_colorstr = NULL; -static const char *alignstr = NULL; -static const char *valignstr = NULL; -static const char *wrapstr = NULL; -static const char *left_marginstr = NULL; -static const char *right_marginstr = NULL; -static const char *underlinestr = NULL; -static const char *strikethroughstr = NULL; -static const char *backingstr = NULL; -static const char *stylestr = NULL; -static const char *tabstopsstr = NULL; -static const char *linesizestr = NULL; -static const char *linerelsizestr = NULL; -static const char *linegapstr = NULL; -static const char *linerelgapstr = NULL; -static const char *itemstr = NULL; -static const char *linefillstr = NULL; -static const char *ellipsisstr = NULL; -static const char *passwordstr = NULL; -static const char *underline_dash_widthstr = NULL; -static const char *underline_dash_gapstr = NULL; - -/** - * @internal - * Init the format strings. - */ -static void -_format_command_init(void) -{ - if (format_refcount == 0) - { - fontstr = eina_stringshare_add("font"); - font_fallbacksstr = eina_stringshare_add("font_fallbacks"); - font_sizestr = eina_stringshare_add("font_size"); - font_sourcestr = eina_stringshare_add("font_source"); - font_weightstr = eina_stringshare_add("font_weight"); - font_stylestr = eina_stringshare_add("font_style"); - font_widthstr = eina_stringshare_add("font_width"); - langstr = eina_stringshare_add("lang"); - colorstr = eina_stringshare_add("color"); - underline_colorstr = eina_stringshare_add("underline_color"); - underline2_colorstr = eina_stringshare_add("underline2_color"); - underline_dash_colorstr = eina_stringshare_add("underline_dash_color"); - outline_colorstr = eina_stringshare_add("outline_color"); - shadow_colorstr = eina_stringshare_add("shadow_color"); - glow_colorstr = eina_stringshare_add("glow_color"); - glow2_colorstr = eina_stringshare_add("glow2_color"); - backing_colorstr = eina_stringshare_add("backing_color"); - strikethrough_colorstr = eina_stringshare_add("strikethrough_color"); - alignstr = eina_stringshare_add("align"); - valignstr = eina_stringshare_add("valign"); - wrapstr = eina_stringshare_add("wrap"); - left_marginstr = eina_stringshare_add("left_margin"); - right_marginstr = eina_stringshare_add("right_margin"); - underlinestr = eina_stringshare_add("underline"); - strikethroughstr = eina_stringshare_add("strikethrough"); - backingstr = eina_stringshare_add("backing"); - stylestr = eina_stringshare_add("style"); - tabstopsstr = eina_stringshare_add("tabstops"); - linesizestr = eina_stringshare_add("linesize"); - linerelsizestr = eina_stringshare_add("linerelsize"); - linegapstr = eina_stringshare_add("linegap"); - linerelgapstr = eina_stringshare_add("linerelgap"); - itemstr = eina_stringshare_add("item"); - linefillstr = eina_stringshare_add("linefill"); - ellipsisstr = eina_stringshare_add("ellipsis"); - passwordstr = eina_stringshare_add("password"); - underline_dash_widthstr = eina_stringshare_add("underline_dash_width"); - underline_dash_gapstr = eina_stringshare_add("underline_dash_gap"); - } - format_refcount++; -} - -/** - * @internal - * Shutdown the format strings. - */ -static void -_format_command_shutdown(void) -{ - if (--format_refcount > 0) return; - - eina_stringshare_del(fontstr); - eina_stringshare_del(font_fallbacksstr); - eina_stringshare_del(font_sizestr); - eina_stringshare_del(font_sourcestr); - eina_stringshare_del(font_weightstr); - eina_stringshare_del(font_stylestr); - eina_stringshare_del(font_widthstr); - eina_stringshare_del(langstr); - eina_stringshare_del(colorstr); - eina_stringshare_del(underline_colorstr); - eina_stringshare_del(underline2_colorstr); - eina_stringshare_del(underline_dash_colorstr); - eina_stringshare_del(outline_colorstr); - eina_stringshare_del(shadow_colorstr); - eina_stringshare_del(glow_colorstr); - eina_stringshare_del(glow2_colorstr); - eina_stringshare_del(backing_colorstr); - eina_stringshare_del(strikethrough_colorstr); - eina_stringshare_del(alignstr); - eina_stringshare_del(valignstr); - eina_stringshare_del(wrapstr); - eina_stringshare_del(left_marginstr); - eina_stringshare_del(right_marginstr); - eina_stringshare_del(underlinestr); - eina_stringshare_del(strikethroughstr); - eina_stringshare_del(backingstr); - eina_stringshare_del(stylestr); - eina_stringshare_del(tabstopsstr); - eina_stringshare_del(linesizestr); - eina_stringshare_del(linerelsizestr); - eina_stringshare_del(linegapstr); - eina_stringshare_del(linerelgapstr); - eina_stringshare_del(itemstr); - eina_stringshare_del(linefillstr); - eina_stringshare_del(ellipsisstr); - eina_stringshare_del(passwordstr); - eina_stringshare_del(underline_dash_widthstr); - eina_stringshare_del(underline_dash_gapstr); -} - -/** - * @internal - * Copies str to dst while removing the \\ char, i.e unescape the escape sequences. - * - * @param[out] dst the destination string - Should not be NULL. - * @param[in] src the source string - Should not be NULL. - */ -static void -_format_clean_param(char *dst, const char *src) -{ - const char *ss; - char *ds; - - ds = dst; - for (ss = src; *ss; ss++, ds++) - { - if ((*ss == '\\') && *(ss + 1)) ss++; - *ds = *ss; - } - *ds = 0; -} - -/** - * @internal - * Parses the cmd and parameter and adds the parsed format to fmt. - * - * @param obj the evas object - should not be NULL. - * @param fmt The format to populate - should not be NULL. - * @param[in] cmd the command to process, should be stringshared. - * @param[in] param the parameter of the command. - */ -static void -_format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *cmd, const char *param) -{ - int len; - char *tmp_param; - - len = strlen(param); - tmp_param = alloca(len + 1); - - _format_clean_param(tmp_param, param); - - /* If we are changing the font, create the fdesc. */ - if ((cmd == font_weightstr) || (cmd == font_widthstr) || - (cmd == font_stylestr) || (cmd == langstr) || - (cmd == fontstr) || (cmd == font_fallbacksstr)) - { - if (!fmt->font.fdesc) - { - fmt->font.fdesc = evas_font_desc_new(); - } - else if (!fmt->font.fdesc->is_new) - { - Evas_Font_Description *old = fmt->font.fdesc; - fmt->font.fdesc = evas_font_desc_dup(fmt->font.fdesc); - if (old) evas_font_desc_unref(old); - } - } - - - if (cmd == fontstr) - { - evas_font_name_parse(fmt->font.fdesc, tmp_param); - } - else if (cmd == font_fallbacksstr) - { - eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), tmp_param); - } - else if (cmd == font_sizestr) - { - int v; - - v = atoi(tmp_param); - if (v != fmt->font.size) - { - fmt->font.size = v; - } - } - else if (cmd == font_sourcestr) - { - if ((!fmt->font.source) || - ((fmt->font.source) && (strcmp(fmt->font.source, tmp_param)))) - { - if (fmt->font.source) eina_stringshare_del(fmt->font.source); - fmt->font.source = eina_stringshare_add(tmp_param); - } - } - else if (cmd == font_weightstr) - { - fmt->font.fdesc->weight = evas_font_style_find(tmp_param, - tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WEIGHT); - } - else if (cmd == font_stylestr) - { - fmt->font.fdesc->slant = evas_font_style_find(tmp_param, - tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_SLANT); - } - else if (cmd == font_widthstr) - { - fmt->font.fdesc->width = evas_font_style_find(tmp_param, - tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WIDTH); - } - else if (cmd == langstr) - { - eina_stringshare_replace(&(fmt->font.fdesc->lang), tmp_param); - } - else if (cmd == colorstr) - _format_color_parse(tmp_param, - &(fmt->color.normal.r), &(fmt->color.normal.g), - &(fmt->color.normal.b), &(fmt->color.normal.a)); - else if (cmd == underline_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.underline.r), &(fmt->color.underline.g), - &(fmt->color.underline.b), &(fmt->color.underline.a)); - else if (cmd == underline2_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.underline2.r), &(fmt->color.underline2.g), - &(fmt->color.underline2.b), &(fmt->color.underline2.a)); - else if (cmd == underline_dash_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g), - &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a)); - else if (cmd == outline_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.outline.r), &(fmt->color.outline.g), - &(fmt->color.outline.b), &(fmt->color.outline.a)); - else if (cmd == shadow_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.shadow.r), &(fmt->color.shadow.g), - &(fmt->color.shadow.b), &(fmt->color.shadow.a)); - else if (cmd == glow_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.glow.r), &(fmt->color.glow.g), - &(fmt->color.glow.b), &(fmt->color.glow.a)); - else if (cmd == glow2_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.glow2.r), &(fmt->color.glow2.g), - &(fmt->color.glow2.b), &(fmt->color.glow2.a)); - else if (cmd == backing_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.backing.r), &(fmt->color.backing.g), - &(fmt->color.backing.b), &(fmt->color.backing.a)); - else if (cmd == strikethrough_colorstr) - _format_color_parse(tmp_param, - &(fmt->color.strikethrough.r), &(fmt->color.strikethrough.g), - &(fmt->color.strikethrough.b), &(fmt->color.strikethrough.a)); - else if (cmd == alignstr) - { - if (!strcmp(tmp_param, "auto")) - { - fmt->halign_auto = EINA_TRUE; - } - else - { - if (!strcmp(tmp_param, "middle")) fmt->halign = 0.5; - else if (!strcmp(tmp_param, "center")) fmt->halign = 0.5; - else if (!strcmp(tmp_param, "left")) fmt->halign = 0.0; - else if (!strcmp(tmp_param, "right")) fmt->halign = 1.0; - else - { - char *endptr = NULL; - double val = strtod(tmp_param, &endptr); - if (endptr) - { - while (*endptr && _is_white(*endptr)) - endptr++; - if (*endptr == '%') - val /= 100.0; - } - fmt->halign = val; - if (fmt->halign < 0.0) fmt->halign = 0.0; - else if (fmt->halign > 1.0) fmt->halign = 1.0; - } - fmt->halign_auto = EINA_FALSE; - } - } - else if (cmd == valignstr) - { - if (!strcmp(tmp_param, "top")) fmt->valign = 0.0; - else if (!strcmp(tmp_param, "middle")) fmt->valign = 0.5; - else if (!strcmp(tmp_param, "center")) fmt->valign = 0.5; - else if (!strcmp(tmp_param, "bottom")) fmt->valign = 1.0; - else if (!strcmp(tmp_param, "baseline")) fmt->valign = -1.0; - else if (!strcmp(tmp_param, "base")) fmt->valign = -1.0; - else - { - char *endptr = NULL; - double val = strtod(tmp_param, &endptr); - if (endptr) - { - while (*endptr && _is_white(*endptr)) - endptr++; - if (*endptr == '%') - val /= 100.0; - } - fmt->valign = val; - if (fmt->valign < 0.0) fmt->valign = 0.0; - else if (fmt->valign > 1.0) fmt->valign = 1.0; - } - } - else if (cmd == wrapstr) - { - if (!strcmp(tmp_param, "word")) - { - fmt->wrap_word = 1; - fmt->wrap_char = fmt->wrap_mixed = 0; - } - else if (!strcmp(tmp_param, "char")) - { - fmt->wrap_word = fmt->wrap_mixed = 0; - fmt->wrap_char = 1; - } - else if (!strcmp(tmp_param, "mixed")) - { - fmt->wrap_word = fmt->wrap_char = 0; - fmt->wrap_mixed = 1; - } - else - { - fmt->wrap_word = fmt->wrap_mixed = fmt->wrap_char = 0; - } - } - else if (cmd == left_marginstr) - { - if (!strcmp(tmp_param, "reset")) - fmt->margin.l = 0; - else - { - if (tmp_param[0] == '+') - fmt->margin.l += atoi(&(tmp_param[1])); - else if (tmp_param[0] == '-') - fmt->margin.l -= atoi(&(tmp_param[1])); - else - fmt->margin.l = atoi(tmp_param); - if (fmt->margin.l < 0) fmt->margin.l = 0; - } - } - else if (cmd == right_marginstr) - { - if (!strcmp(tmp_param, "reset")) - fmt->margin.r = 0; - else - { - if (tmp_param[0] == '+') - fmt->margin.r += atoi(&(tmp_param[1])); - else if (tmp_param[0] == '-') - fmt->margin.r -= atoi(&(tmp_param[1])); - else - fmt->margin.r = atoi(tmp_param); - if (fmt->margin.r < 0) fmt->margin.r = 0; - } - } - else if (cmd == underlinestr) - { - if (!strcmp(tmp_param, "off")) - { - fmt->underline = 0; - fmt->underline2 = 0; - } - else if ((!strcmp(tmp_param, "on")) || - (!strcmp(tmp_param, "single"))) - { - fmt->underline = 1; - fmt->underline2 = 0; - } - else if (!strcmp(tmp_param, "double")) - { - fmt->underline = 1; - fmt->underline2 = 1; - } - else if (!strcmp(tmp_param, "dashed")) - fmt->underline_dash = 1; - } - else if (cmd == strikethroughstr) - { - if (!strcmp(tmp_param, "off")) - fmt->strikethrough = 0; - else if (!strcmp(tmp_param, "on")) - fmt->strikethrough = 1; - } - else if (cmd == backingstr) - { - if (!strcmp(tmp_param, "off")) - fmt->backing = 0; - else if (!strcmp(tmp_param, "on")) - fmt->backing = 1; - } - else if (cmd == stylestr) - { - 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) - { - fmt->tabstops = atoi(tmp_param); - if (fmt->tabstops < 1) fmt->tabstops = 1; - } - else if (cmd == linesizestr) - { - fmt->linesize = atoi(tmp_param); - fmt->linerelsize = 0.0; - } - else if (cmd == linerelsizestr) - { - char *endptr = NULL; - double val = strtod(tmp_param, &endptr); - if (endptr) - { - while (*endptr && _is_white(*endptr)) - endptr++; - if (*endptr == '%') - { - fmt->linerelsize = val / 100.0; - fmt->linesize = 0; - if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0; - } - } - } - else if (cmd == linegapstr) - { - fmt->linegap = atoi(tmp_param); - fmt->linerelgap = 0.0; - } - else if (cmd == linerelgapstr) - { - char *endptr = NULL; - double val = strtod(tmp_param, &endptr); - if (endptr) - { - while (*endptr && _is_white(*endptr)) - endptr++; - if (*endptr == '%') - { - fmt->linerelgap = val / 100.0; - fmt->linegap = 0; - if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0; - } - } - } - else if (cmd == itemstr) - { - // itemstr == replacement object items in textblock - inline imges - // for example - } - else if (cmd == linefillstr) - { - char *endptr = NULL; - double val = strtod(tmp_param, &endptr); - if (endptr) - { - while (*endptr && _is_white(*endptr)) - endptr++; - if (*endptr == '%') - { - fmt->linefill = val / 100.0; - if (fmt->linefill < 0.0) fmt->linefill = 0.0; - } - } - } - else if (cmd == ellipsisstr) - { - char *endptr = NULL; - fmt->ellipsis = strtod(tmp_param, &endptr); - if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0)) - fmt->ellipsis = -1.0; - else - { - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - o->have_ellipsis = 1; - } - } - else if (cmd == passwordstr) - { - if (!strcmp(tmp_param, "off")) - fmt->password = 0; - else if (!strcmp(tmp_param, "on")) - fmt->password = 1; - } - else if (cmd == underline_dash_widthstr) - { - fmt->underline_dash_width = atoi(tmp_param); - if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1; - } - else if (cmd == underline_dash_gapstr) - { - fmt->underline_dash_gap = atoi(tmp_param); - if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1; - } -} - -/** - * @internal - * Returns #EINA_TRUE if the item is a format parameter, #EINA_FALSE otherwise. - * - * @param[in] item the item to check - Not NULL. - */ -static Eina_Bool -_format_is_param(const char *item) -{ - if (strchr(item, '=')) return EINA_TRUE; - return EINA_FALSE; -} - -/** - * @internal - * Parse the format item and populate key and val with the stringshares that - * corrospond to the formats parsed. - * It expects item to be of the structure: - * "key=val" - * - * @param[in] item the item to parse - Not NULL. - * @param[out] key where to store the key at - Not NULL. - * @param[out] val where to store the value at - Not NULL. - */ -static void -_format_param_parse(const char *item, const char **key, const char **val) -{ - const char *start, *end, *quote; - - start = strchr(item, '='); - *key = eina_stringshare_add_length(item, start - item); - start++; /* Advance after the '=' */ - /* If we can find a quote, our new delimiter is a quote, not a space. */ - if ((quote = strchr(start, '\''))) - { - start = quote + 1; - end = strchr(start, '\''); - } - else - { - end = strchr(start, ' '); - } - - /* Null terminate before the spaces */ - if (end) - { - *val = eina_stringshare_add_length(start, end - start); - } - else - { - *val = eina_stringshare_add(start); - } -} - -/** - * @internal - * This function parses the format passed in *s and advances s to point to the - * next format item, while returning the current one as the return value. - * @param s The current and returned position in the format string. - * @return the current item parsed from the string. - */ -static const char * -_format_parse(const char **s) -{ - const char *p; - const char *s1 = NULL, *s2 = NULL; - Eina_Bool quote = EINA_FALSE;; - - p = *s; - if (*p == 0) return NULL; - for (;;) - { - if (!s1) - { - if (*p != ' ') s1 = p; - if (*p == 0) break; - } - else if (!s2) - { - if (*p == '\'') - { - quote = !quote; - } - - if ((p > *s) && (p[-1] != '\\') && (!quote)) - { - if (*p == ' ') s2 = p; - } - if (*p == 0) s2 = p; - } - p++; - if (s1 && s2) - { - *s = s2; - return s1; - } - } - *s = p; - return NULL; -} - -/** - * @internal - * Parse the format str and populate fmt with the formats found. - * - * @param obj The evas object - Not NULL. - * @param[out] fmt The format to populate - Not NULL. - * @param[in] str the string to parse.- Not NULL. - */ -static void -_format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *str) -{ - const char *s; - const char *item; - - s = str; - - /* get rid of any spaces at the start of the string */ - while (*s == ' ') s++; - - while ((item = _format_parse(&s))) - { - if (_format_is_param(item)) - { - const char *key = NULL, *val = NULL; - - _format_param_parse(item, &key, &val); - _format_command(obj, fmt, key, val); - eina_stringshare_del(key); - eina_stringshare_del(val); - } - else - { - /* immediate - not handled here */ - } - } -} - -/** - * @internal - * Duplicate a format and return the duplicate. - * - * @param obj The evas object - Not NULL. - * @param[in] fmt The format to duplicate - Not NULL. - * @return the copy of the format. - */ -static Evas_Object_Textblock_Format * -_format_dup(Evas_Object *obj, const Evas_Object_Textblock_Format *fmt) -{ - Evas_Object_Textblock_Format *fmt2; - - fmt2 = calloc(1, sizeof(Evas_Object_Textblock_Format)); - memcpy(fmt2, fmt, sizeof(Evas_Object_Textblock_Format)); - fmt2->ref = 1; - fmt2->font.fdesc = evas_font_desc_ref(fmt->font.fdesc); - - if (fmt->font.source) fmt2->font.source = eina_stringshare_add(fmt->font.source); - - /* FIXME: just ref the font here... */ - fmt2->font.font = evas_font_load(obj->layer->evas, fmt2->font.fdesc, - fmt2->font.source, (int)(((double) fmt2->font.size) * obj->cur.scale)); - return fmt2; -} - - - - -/** - * @internal - * @typedef Ctxt - * - * A pack of information that needed to be passed around in the layout engine, - * packed for easier access. - */ -typedef struct _Ctxt Ctxt; - -struct _Ctxt -{ - Evas_Object *obj; - Evas_Object_Textblock *o; - - Evas_Object_Textblock_Paragraph *paragraphs; - 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; - int wmax, hmax; - int maxascent, maxdescent; - int marginl, marginr; - int line_no; - int underline_extend; - int have_underline, have_underline2; - double align, valign; - 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); -static void _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti); -static void _layout_do_format(const Evas_Object *obj, 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, Eina_Bool create_item); -/** - * @internal - * Adjust the ascent/descent of the format and context. - * - * @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(const Evas_Object *obj, - Evas_Coord *maxascent, Evas_Coord *maxdescent, - Evas_Object_Textblock_Format *fmt) -{ - int ascent, descent; - - if (fmt->font.font) - { - // 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 = 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) - { - ascent = ((fmt->linesize * ascent) / (ascent + descent)); - descent = fmt->linesize - ascent; - } - } - else if (fmt->linerelsize > 0.0) - { - descent = descent * fmt->linerelsize; - ascent = ascent * fmt->linerelsize; - } - descent += fmt->linegap; - descent += ((ascent + descent) * fmt->linerelgap); - if (*maxascent < ascent) *maxascent = ascent; - if (*maxdescent < descent) *maxdescent = descent; - if (fmt->linefill > 0.0) - { - int dh; - - dh = obj->cur.geometry.h - (*maxascent + *maxdescent); - if (dh < 0) dh = 0; - dh = fmt->linefill * dh; - *maxdescent += dh / 2; - *maxascent += dh - (dh / 2); - // FIXME: set flag that says "if heigh changes - reformat" - } - } -} - -/** - * @internal - * Create a new line using the info from the format and update the format - * and context. - * - * @param c The context to work on - Not NULL. - * @param fmt The format to use info from - NOT NULL. - */ -static void -_layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt) -{ - c->ln = calloc(1, sizeof(Evas_Object_Textblock_Line)); - c->align = fmt->halign; - c->align_auto = fmt->halign_auto; - c->marginl = fmt->margin.l; - c->marginr = fmt->margin.r; - c->par->lines = (Evas_Object_Textblock_Line *)eina_inlist_append(EINA_INLIST_GET(c->par->lines), EINA_INLIST_GET(c->ln)); - c->x = 0; - c->maxascent = c->maxdescent = 0; - c->ln->line_no = -1; - c->ln->par = c->par; -} - -static inline Evas_Object_Textblock_Paragraph * -_layout_find_paragraph_by_y(Evas_Object_Textblock *o, Evas_Coord y) -{ - Evas_Object_Textblock_Paragraph *start, *par; - int i; - - start = o->paragraphs; - - for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++) - { - if (!o->par_index[i] || (o->par_index[i]->y > y)) - { - break; - } - start = o->par_index[i]; - } - - EINA_INLIST_FOREACH(start, par) - { - if ((par->y <= y) && (y < par->y + par->h)) - return par; - } - - return NULL; -} - -static inline Evas_Object_Textblock_Paragraph * -_layout_find_paragraph_by_line_no(Evas_Object_Textblock *o, int line_no) -{ - Evas_Object_Textblock_Paragraph *start, *par; - int i; - - start = o->paragraphs; - - for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++) - { - if (!o->par_index[i] || (o->par_index[i]->line_no > line_no)) - { - break; - } - start = o->par_index[i]; - } - - EINA_INLIST_FOREACH(start, par) - { - Evas_Object_Textblock_Paragraph *npar = - (Evas_Object_Textblock_Paragraph *) EINA_INLIST_GET(par)->next; - if ((par->line_no <= line_no) && - (!npar || (line_no < npar->line_no))) - return par; - } - - return 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, - Eina_Bool append) -{ - Evas_Object_Textblock_Paragraph *rel_par = c->par; - c->par = calloc(1, sizeof(Evas_Object_Textblock_Paragraph)); - 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; - c->o->num_paragraphs++; -} - -#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 __UNUSED__, - Evas_Object_Textblock_Paragraph *par) -{ - while (par->lines) - { - Evas_Object_Textblock_Line *ln; - - 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(ln); - } -} - -/** - * @internal - * Free the layout paragraph and all of it's lines and logical items. - */ -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); - - { - Eina_List *i, *i_prev; - Evas_Object_Textblock_Item *it; - EINA_LIST_FOREACH_SAFE(par->logical_items, i, i_prev, it) - { - _item_free(obj, NULL, it); - } - 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->num_paragraphs--; - - free(par); -} - -/** - * @internal - * Clear all the paragraphs from the inlist pars. - * - * @param obj the evas object - Not NULL. - * @param pars the paragraphs to clean - Not NULL. - */ -static void -_paragraphs_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars) -{ - Evas_Object_Textblock_Paragraph *par; - - EINA_INLIST_FOREACH(EINA_INLIST_GET(pars), par) - { - _paragraph_clear(obj, par); - } -} - -/** - * @internal - * Free the paragraphs from the inlist pars, the difference between this and - * _paragraphs_clear is that the latter keeps the logical items and the par - * items, while the former frees them as well. - * - * @param obj the evas object - Not NULL. - * @param pars the paragraphs to clean - Not NULL. - */ -static void -_paragraphs_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars) -{ - Evas_Object_Textblock *o; - o = (Evas_Object_Textblock *)(obj->object_data); - - o->num_paragraphs = 0; - - while (pars) - { - Evas_Object_Textblock_Paragraph *par; - - par = (Evas_Object_Textblock_Paragraph *) pars; - pars = (Evas_Object_Textblock_Paragraph *)eina_inlist_remove(EINA_INLIST_GET(pars), EINA_INLIST_GET(par)); - _paragraph_free(obj, par); - } -} - -/** - * @internal - * Push fmt to the format stack, if fmt is NULL, will fush a default item. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to push. - * @see _layout_format_pop() - */ -static Evas_Object_Textblock_Format * -_layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt, - Evas_Object_Textblock_Node_Format *fnode) -{ - if (fmt) - { - fmt = _format_dup(c->obj, fmt); - c->format_stack = eina_list_prepend(c->format_stack, fmt); - fmt->fnode = fnode; - } - else - { - fmt = calloc(1, sizeof(Evas_Object_Textblock_Format)); - c->format_stack = eina_list_prepend(c->format_stack, fmt); - fmt->ref = 1; - fmt->halign = 0.0; - fmt->halign_auto = EINA_TRUE; - fmt->valign = -1.0; - fmt->style = EVAS_TEXT_STYLE_PLAIN; - fmt->tabstops = 32; - fmt->linesize = 0; - fmt->linerelsize = 0.0; - fmt->linegap = 0; - fmt->underline_dash_width = 6; - fmt->underline_dash_gap = 2; - fmt->linerelgap = 0.0; - fmt->password = 1; - } - return fmt; -} - -/** - * @internal - * Pop fmt to the format stack, if there's something in the stack free fmt - * and set it to point to the next item instead, else return fmt. - * - * @param c the context to work on - Not NULL. - * @param format - the text of the format to free (assured to start with '-'). - * @return the next format in the stack, or format if there's none. - * @see _layout_format_push() - */ -static Evas_Object_Textblock_Format * -_layout_format_pop(Ctxt *c, const char *format) -{ - Evas_Object_Textblock_Format *fmt = eina_list_data_get(c->format_stack); - - if ((c->format_stack) && (c->format_stack->next)) - { - Eina_List *redo_nodes = NULL; - - /* Generic pop, should just pop. */ - if (((format[0] == ' ') && !format[1]) || - !format[0]) - { - _format_unref_free(c->obj, fmt); - c->format_stack = - eina_list_remove_list(c->format_stack, c->format_stack); - } - else - { - size_t len = strlen(format); - Eina_List *i, *i_next; - /* Remove only the matching format. */ - EINA_LIST_FOREACH_SAFE(c->format_stack, i, i_next, fmt) - { - /* Stop when we reach the base item */ - if (!i_next) - break; - - c->format_stack = - eina_list_remove_list(c->format_stack, c->format_stack); - - /* Make sure the ending tag matches the starting tag. - * I.e whole of the ending tag matches the start of the - * starting tag, and the starting tag's next char is either - * NULL or white. Skip the starting '+'. */ - if (_FORMAT_IS_CLOSER_OF( - fmt->fnode->orig_format, format, len)) - { - _format_unref_free(c->obj, fmt); - break; - } - else - { - redo_nodes = eina_list_prepend(redo_nodes, fmt->fnode); - _format_unref_free(c->obj, fmt); - } - } - } - - /* Redo all the nodes needed to be redone */ - { - Evas_Object_Textblock_Node_Format *fnode; - Eina_List *i, *i_next; - - EINA_LIST_FOREACH_SAFE(redo_nodes, i, i_next, fnode) - { - /* FIXME: Actually do something with the new acquired padding, - * the can be different and affect our padding! */ - Evas_Coord style_pad_l, style_pad_r, style_pad_t, style_pad_b; - style_pad_l = style_pad_r = style_pad_t = style_pad_b = 0; - redo_nodes = eina_list_remove_list(redo_nodes, i); - fmt = eina_list_data_get(c->format_stack); - _layout_do_format(c->obj, c, &fmt, fnode, - &style_pad_l, &style_pad_r, - &style_pad_t, &style_pad_b, EINA_FALSE); - } - } - - fmt = eina_list_data_get(c->format_stack); - } - return fmt; -} - -/** - * @internal - * Parse item and fill fmt with the item. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to fill - not null. - */ -static void -_layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const char *item) -{ - const char *key = NULL, *val = NULL; - - _format_param_parse(item, &key, &val); - if ((key) && (val)) _format_command(c->obj, fmt, key, val); - if (key) eina_stringshare_del(key); - if (val) eina_stringshare_del(val); - c->align = fmt->halign; - c->align_auto = fmt->halign_auto; - c->marginl = fmt->margin.l; - c->marginr = fmt->margin.r; -} - -#define VSIZE_FULL 0 -#define VSIZE_ASCENT 1 - -#define SIZE 0 -#define SIZE_ABS 1 -#define SIZE_REL 2 - -/** - * @internal - * Get the current line's alignment from the context. - * - * @param c the context to work on - Not NULL. - */ -static inline double -_layout_line_align_get(Ctxt *c) -{ -#ifdef BIDI_SUPPORT - if (c->align_auto && c->ln) - { - if (c->ln->items && c->ln->items->text_node && - (c->ln->par->direction == EVAS_BIDI_DIRECTION_RTL)) - { - /* Align right*/ - return 1.0; - } - else - { - /* Align left */ - return 0.0; - } - } -#endif - return c->align; -} - -#ifdef BIDI_SUPPORT -/** - * @internal - * Reorder the items in visual order - * - * @param line the line to reorder - */ -static void -_layout_line_reorder(Evas_Object_Textblock_Line *line) -{ - /*FIXME: do it a bit more efficient - not very efficient ATM. */ - 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->par->bidi_props) - { - Evas_BiDi_Paragraph_Props *props; - props = line->par->bidi_props; - start = end = line->items->text_pos; - - /* Find the first and last positions in the line */ - - EINA_INLIST_FOREACH(line->items, it) - { - if (it->text_pos < start) - { - start = it->text_pos; - } - else - { - int tlen; - tlen = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? - _ITEM_TEXT(it)->text_props.text_len : 1; - if (it->text_pos + tlen > end) - { - end = it->text_pos + tlen; - } - } - } - - len = end - start; - evas_bidi_props_reorder_line(NULL, start, len, props, &v_to_l); - - /* Update visual pos */ - { - Evas_Object_Textblock_Item *i; - i = line->items; - while (i) - { - i->visual_pos = evas_bidi_position_logical_to_visual( - v_to_l, len, i->text_pos - start); - i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(i)->next; - } - } - - /*FIXME: not very efficient, sort the items arrays. Anyhow, should only - * reorder if it's a bidi paragraph */ - { - Evas_Object_Textblock_Item *i, *j, *min; - i = line->items; - while (i) - { - min = i; - EINA_INLIST_FOREACH(i, j) - { - if (j->visual_pos < min->visual_pos) - { - min = j; - } - } - if (min != i) - { - line->items = (Evas_Object_Textblock_Item *) eina_inlist_remove(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min)); - line->items = (Evas_Object_Textblock_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i)); - } - - i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(min)->next; - } - } - } - - if (v_to_l) free(v_to_l); - 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: - 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 (h > (*maxdescent + *maxascent)) - { - *maxascent += h - (*maxdescent + *maxascent); - *_y = -*maxascent; - } - else - *_y = -(h - *maxdescent); - break; - case VSIZE_ASCENT: - if (h > *maxascent) - { - *maxascent = h; - *_y = -h; - } - else - *_y = -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; -} - -/** - * @internal - * Order the items in the line, update it's properties and update it's - * corresponding paragraph. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to use. - * @param add_line true if we should create a line, false otherwise. - */ -static void -_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt) -{ - Evas_Object_Textblock_Item *it; - Evas_Coord x = 0; - - /* If there are no text items yet, calc ascent/descent - * according to the current format. */ - if (c->maxascent + c->maxdescent == 0) - _layout_format_ascent_descent_adjust(c->obj, &c->maxascent, - &c->maxdescent, fmt); - - /* Adjust all the item sizes according to the final line size, - * and update the x positions of all the items of the line. */ - EINA_INLIST_FOREACH(c->ln->items, it) - { - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) - { - Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); - if (!fi->formatme) goto loop_advance; - _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->adv) > c->ln->w) c->ln->w = it->x + it->adv; - } - - c->ln->y = (c->y - c->par->y) + c->o->style_pad.t; - c->ln->h = c->maxascent + c->maxdescent; - c->ln->baseline = c->maxascent; - if (c->have_underline2) - { - if (c->maxdescent < 4) c->underline_extend = 4 - c->maxdescent; - } - else if (c->have_underline) - { - if (c->maxdescent < 2) c->underline_extend = 2 - c->maxdescent; - } - c->ln->line_no = c->line_no - c->ln->par->line_no; - c->line_no++; - c->y += c->maxascent + c->maxdescent; - if (c->w >= 0) - { - c->ln->x = c->marginl + c->o->style_pad.l + - ((c->w - c->ln->w - - c->o->style_pad.l - c->o->style_pad.r - - c->marginl - c->marginr) * _layout_line_align_get(c)); - } - else - { - c->ln->x = c->marginl + c->o->style_pad.l; - } - - c->par->h = c->ln->y + c->ln->h; - 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; - } -} - -/** - * @internal - * Create a new line and append it to the lines in the context. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to use. - * @param add_line true if we should create a line, false otherwise. - */ -static void -_layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt) -{ - _layout_line_finalize(c, fmt); - _layout_line_new(c, fmt); -} - -/** - * @internal - * Create a new text layout item from the string and the format. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to use. - * @param str the string to use. - * @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) -{ - Evas_Object_Textblock_Text_Item *ti; - - ti = calloc(1, sizeof(Evas_Object_Textblock_Text_Item)); - ti->parent.format = fmt; - ti->parent.format->ref++; - ti->parent.type = EVAS_TEXTBLOCK_ITEM_TEXT; - return ti; -} - -/** - * @internal - * Return the cutoff of the text in the text item. - * - * @param c the context to work on - Not NULL. - * @param fmt the format to use. - Not NULL. - * @param it the item to check - Not null. - * @return -1 if there is no cutoff (either because there is really none, - * or because of an error), cutoff index on success. - */ -static int -_layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti) -{ - if (fmt->font.font) - { - Evas_Coord x; - x = c->w - c->o->style_pad.l - c->o->style_pad.r - c->marginl - - 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_props, x, 0); - } - return -1; -} - -/** - * @internal - * 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. - * @param lti the logical list item of the item. - * @param cut the cut index. - * @return the second (newly created) item. - */ -static Evas_Object_Textblock_Text_Item * -_layout_item_text_split_strip_white(Ctxt *c, - Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, size_t cut) -{ - const Eina_Unicode *ts; - Evas_Object_Textblock_Text_Item *new_ti = NULL, *white_ti = NULL; - - ts = GET_ITEM_TEXT(ti); - - if (!IS_AT_END(ti, cut) && (ti->text_props.text_len > 0)) - { - 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 + cut; - new_ti->parent.merge = EINA_TRUE; - - evas_common_text_props_split(&ti->text_props, - &new_ti->text_props, cut); - _layout_text_add_logical_item(c, new_ti, lti); - } - - /* Strip the previous white if needed */ - if ((cut >= 1) && _is_white(ts[cut - 1]) && (ti->text_props.text_len > 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, 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); - } - return new_ti; -} - -/** - * @internal - * Merge item2 into item1 and free item2. - * - * @param c the context to work on - Not NULL. - * @param item1 the item to copy to - * @param item2 the item to copy from - */ -static void -_layout_item_merge_and_free(Ctxt *c, - Evas_Object_Textblock_Text_Item *item1, - Evas_Object_Textblock_Text_Item *item2) -{ - evas_common_text_props_merge(&item1->text_props, - &item2->text_props); - - _text_item_update_sizes(c, item1); - - item1->parent.merge = EINA_FALSE; - item1->parent.visually_deleted = EINA_FALSE; - - _item_free(c->obj, NULL, _ITEM(item2)); -} - -/** - * @internal - * Calculates an item's size. - * - * @param c the context - * @param it the item itself. - */ -static void -_text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) -{ - 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_props, &tw, &th); - inset = 0; - if (fmt->font.font) - inset = c->ENFN->font_inset_get(c->ENDT, fmt->font.font, - &ti->text_props); - advw = 0; - if (fmt->font.font) - 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 & 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 = advw; - ti->parent.x = 0; -} - -/** - * @internal - * Adds the item to the list, updates the item's properties (e.g, x,w,h) - * - * @param c the context - * @param it the item itself. - * @param rel item ti will be appened after, NULL = last. - */ -static void -_layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, - Eina_List *rel) -{ - _text_item_update_sizes(c, ti); - - c->par->logical_items = eina_list_append_relative_list( - c->par->logical_items, ti, rel); -} - -/** - * @internal - * Appends the text from node n starting at start ending at off to the layout. - * It uses the fmt for the formatting. - * - * @param c the current context- NOT NULL. - * @param fmt the format to use. - * @param n the text node. - Not null. - * @param start the start position. - in range. - * @param off the offset - start + offset in range. if offset is -1, it'll add everything to the end of the string if offset = 0 it'll return with doing nothing. - * @param repch a replacement char to print instead of the original string, for example, * when working with passwords. - */ -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) -{ - 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 */ - if (n) - { - int len; - int orig_off = off; - - /* Figure out if we want to bail, work with an empty string, - * or continue with a slice of the passed string */ - len = eina_ustrbuf_length_get(n->unicode); - if (off == 0) return; - else if (off < 0) off = len - start; - - if (start < 0) - { - start = 0; - } - else if ((start == 0) && (off == 0) && (orig_off == -1)) - { - /* Special case that means that we need to add an empty - * item */ - str = EINA_UNICODE_EMPTY_STRING; - goto skip; - } - else if ((start >= len) || (start + off > len)) - { - return; - } - - /* If we work with a replacement char, create a string which is the same - * but with replacement chars instead of regular chars. */ - if ((fmt->password) && (repch) && (eina_ustrbuf_length_get(n->unicode))) - { - int i, ind; - Eina_Unicode *ptr; - - tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode)); - ind = 0; - urepch = eina_unicode_utf8_get_next(repch, &ind); - 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) + start; - } - - cur_len = off; - } - -skip: - tbase = 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) - { - Evas_Font_Instance *script_fi = NULL; - int script_len, tmp_cut; - Evas_Script_Type script; - - 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) - { - 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; - - 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, - 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, - cur_fi, str, &ti->text_props, c->par->bidi_props, - ti->parent.text_pos, run_len); - } - str += run_len; - script_len -= run_len; - - _layout_text_add_logical_item(c, ti, NULL); - } - } -} - -/** - * @internal - * Add a format item from the format node n and the item item. - * - * @param c the current context- NOT NULL. - * @param n the source format node - not null. - * @param item the format text. - * - * @return the new format item. - */ -static Evas_Object_Textblock_Format_Item * -_layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const char *item, Evas_Object_Textblock_Format *fmt) -{ - Evas_Object_Textblock_Format_Item *fi; - - fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item)); - fi->item = eina_stringshare_add(item); - fi->parent.type = EVAS_TEXTBLOCK_ITEM_FORMAT; - fi->parent.format = fmt; - fi->parent.format->ref++; - c->par->logical_items = eina_list_append(c->par->logical_items, fi); - if (n) - { - fi->parent.text_node = n->text_node; - /* FIXME: make it more efficient */ - fi->parent.text_pos = _evas_textblock_node_format_pos_get(n); -#ifdef BIDI_SUPPORT - fi->bidi_dir = (evas_bidi_is_rtl_char( - c->par->bidi_props, - 0, - fi->parent.text_pos)) ? - EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; -#else - fi->bidi_dir = EVAS_BIDI_DIRECTION_LTR; -#endif - } - return fi; -} - -/** - * @internal - * Should be call after we finish filling a format. - * FIXME: doc. - */ -static void -_format_finalize(Evas_Object *obj, Evas_Object_Textblock_Format *fmt) -{ - void *of; - - of = fmt->font.font; - - fmt->font.font = evas_font_load(obj->layer->evas, fmt->font.fdesc, - fmt->font.source, (int)(((double) fmt->font.size) * obj->cur.scale)); - if (of) evas_font_free(obj->layer->evas, of); -} - -/** - * @internal - * Returns true if the item is a tab - * @def _IS_TAB(item) - */ -#define _IS_TAB(item) \ - (!strcmp(item, "tab") || !strcmp(item, "\t") || !strcmp(item, "\\t")) -/** - * @internal - * Returns true if the item is a line spearator, false otherwise - * @def _IS_LINE_SEPARATOR(item) - */ -#define _IS_LINE_SEPARATOR(item) \ - (!strcmp(item, "br") || !strcmp(item, "\n") || !strcmp(item, "\\n")) -/** - * @internal - * Returns true if the item is a paragraph separator, false otherwise - * @def _IS_PARAGRAPH_SEPARATOR(item) - */ -#define _IS_PARAGRAPH_SEPARATOR_SIMPLE(item) \ - (!strcmp(item, "ps")) -/** - * @internal - * Returns true if the item is a paragraph separator, false otherwise - * takes legacy mode into account. - * @def _IS_PARAGRAPH_SEPARATOR(item) - */ -#define _IS_PARAGRAPH_SEPARATOR(o, item) \ - (_IS_PARAGRAPH_SEPARATOR_SIMPLE(item) || \ - (o->legacy_newline && _IS_LINE_SEPARATOR(item))) /* Paragraph separator */ - -/** - * @internal - * Handles a format by processing a format node. It returns the relevant format - * through _fmt and updates the padding through style_pad_*. If needed, - * it creates a format item. - * - * @param obj the evas object - NOT NULL. - * @param c the current context- NOT NULL. - * @param _fmt the format that holds the result. - * @param n the source format node - not null. - * @param style_pad_l the pad to update. - * @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, - Eina_Bool create_item) -{ - Evas_Object_Textblock_Format *fmt = *_fmt; - /* FIXME: comment the algo */ - - const char *s; - const char *item; - int handled = 0; - - s = n->format; - if (!strncmp(s, "item ", 5)) - { - // one of: - // item size=20x10 href=name - // item relsize=20x10 href=name - // item abssize=20x10 href=name - // - // optional arguments: - // vsize=full - // vsize=ascent - // - // size == item size (modifies line size) - can be multiplied by - // scale factor - // relsize == relative size (height is current font height, width - // modified accordingly keeping aspect) - // abssize == absolute size (modifies line size) - never mulitplied by - // scale factor - // href == name of item - to be found and matched later and used for - // positioning - Evas_Object_Textblock_Format_Item *fi; - int w = 1, h = 1; - int vsize = 0, size = 0; - char *p; - - // don't care - //href = strstr(s, " href="); - p = strstr(s, " vsize="); - if (p) - { - p += 7; - if (!strncmp(p, "full", 4)) vsize = VSIZE_FULL; - else if (!strncmp(p, "ascent", 6)) vsize = VSIZE_ASCENT; - } - p = strstr(s, " size="); - if (p) - { - p += 6; - if (sscanf(p, "%ix%i", &w, &h) == 2) - { - /* this is handled somewhere else because it depends - * on the current scaling factor of the object which - * may change and break because the results of this - * function are cached */ - size = SIZE; - } - } - else - { - p = strstr(s, " absize="); - if (p) - { - p += 8; - if (sscanf(p, "%ix%i", &w, &h) == 2) - { - size = SIZE_ABS; - } - } - else - { - p = strstr(s, " relsize="); - if (p) - { - /* this is handled somewhere else because it depends - * on the line it resides in, which is not defined - * at this point and will change anyway, which will - * break because the results of this function are - * cached */ - size = SIZE_REL; - } - } - } - - 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; - } - /* Not sure if it's the best handling, but will do it for now. */ - fmt = _layout_format_push(c, fmt, n); - handled = 1; - } - - if (!handled) - { - Eina_Bool push_fmt = EINA_FALSE; - if (n->opener && !n->own_closer) - { - fmt = _layout_format_push(c, fmt, n); - push_fmt = EINA_TRUE; - } - else if (!n->opener) - { - fmt = _layout_format_pop(c, n->orig_format); - } - while ((item = _format_parse(&s))) - { - if (_format_is_param(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 if (create_item) - { - if ((_IS_PARAGRAPH_SEPARATOR(c->o, item)) || - (_IS_LINE_SEPARATOR(item))) - { - Evas_Object_Textblock_Format_Item *fi; - - fi = _layout_format_item_add(c, n, item, fmt); - - fi->parent.w = fi->parent.adv = 0; - } - else if (_IS_TAB(item)) - { - Evas_Object_Textblock_Format_Item *fi; - - fi = _layout_format_item_add(c, n, item, fmt); - fi->parent.w = fi->parent.adv = fmt->tabstops; - fi->formatme = 1; - } - } - } - _format_finalize(c->obj, fmt); - } - - { - Evas_Coord pad_l, pad_r, pad_t, pad_b; - pad_l = pad_r = pad_t = pad_b = 0; - evas_text_style_pad_get(fmt->style, &pad_l, &pad_r, &pad_t, &pad_b); - if (pad_l > *style_pad_l) *style_pad_l = pad_l; - if (pad_r > *style_pad_r) *style_pad_r = pad_r; - if (pad_t > *style_pad_t) *style_pad_t = pad_t; - if (pad_b > *style_pad_b) *style_pad_b = pad_b; - } - - if (fmt->underline2) - c->have_underline2 = 1; - else if (fmt->underline || fmt->underline_dash) - c->have_underline = 1; - *_fmt = fmt; -} - -static void -_layout_update_par(Ctxt *c) -{ - Evas_Object_Textblock_Paragraph *last_par; - last_par = (Evas_Object_Textblock_Paragraph *) - EINA_INLIST_GET(c->par)->prev; - if (last_par) - { - c->par->y = last_par->y + last_par->h; - } - else - { - c->par->y = 0; - } -} - -/* -1 means no wrap */ -static int -_layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Item *it, size_t line_start, - const char *breaks) -{ - int wrap; - size_t uwrap; - size_t len = eina_ustrbuf_length_get(it->text_node->unicode); - /* Currently not being used, because it doesn't contain relevant - * information */ - (void) breaks; - - { - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) - wrap = 0; - else - wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); - - if (wrap < 0) - return -1; - uwrap = (size_t) wrap + it->text_pos; - } - - - if ((uwrap == line_start) && (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)) - { - uwrap = it->text_pos + - (size_t) evas_common_text_props_cluster_next( - &_ITEM_TEXT(it)->text_props, wrap); - } - if ((uwrap <= line_start) || (uwrap > len)) - return -1; - - 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_Item *it, Eina_Bool mixed_wrap, - size_t line_start, const char *breaks) -{ - Eina_Bool wrap_after = EINA_FALSE; - size_t wrap; - size_t orig_wrap; - const Eina_Unicode *str = eina_ustrbuf_string_get( - it->text_node->unicode); - int item_start = it->text_pos; - size_t len = eina_ustrbuf_length_get(it->text_node->unicode); -#ifndef HAVE_LINEBREAK - /* Not used without liblinebreak ATM. */ - (void) breaks; -#endif - - { - int swrap = -1; - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) - swrap = 0; - else - swrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); - /* Avoiding too small textblocks to even contain one char. - * FIXME: This can cause breaking inside ligatures. */ - - 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; - } - else - { - if (mixed_wrap) - { - return ((orig_wrap >= line_start) && (orig_wrap < len)) ? - ((int) orig_wrap) : -1; - } - else - { - /* Scan forward to find the next wrapping point */ - wrap = orig_wrap; - wrap_after = EINA_TRUE; - } - } - } - - /* If we need to find the position after the cutting point */ - if ((wrap == line_start) || (wrap_after)) - { - if (mixed_wrap) - { - return _layout_get_charwrap(c, fmt, it, - line_start, breaks); - } - else - { - while (wrap < len) - { - if (ALLOW_BREAK(wrap)) - break; - wrap++; - } - - - if ((wrap < len) && (wrap > line_start)) - { - MOVE_NEXT_UNTIL(len, wrap); - return wrap; - } - else - { - return -1; - } - } - } - - return -1; -} - -/* -1 means no wrap */ -static int -_layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Item *it, size_t line_start, - const char *breaks) -{ - return _layout_get_word_mixwrap_common(c, fmt, it, EINA_FALSE, line_start, - breaks); -} - -/* -1 means no wrap */ -static int -_layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Item *it, size_t line_start, - const char *breaks) -{ - return _layout_get_word_mixwrap_common(c, fmt, it, 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; - Evas_Script_Type script; - Evas_Font_Instance *script_fi = NULL, *cur_fi; - size_t len = 1; /* The length of _ellip_str */ - - /* 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 - - 1; - } - else - { - ellip_ti->parent.text_pos++; - } - - 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; - Evas_Object_Textblock_Item *last_it; - Evas_Coord save_cx; - int wrap; - ellip_ti = _layout_ellipsis_item_new(c, it); - last_it = it; - - save_cx = c->x; - c->w -= ellip_ti->parent.w; - - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - - wrap = _layout_text_cutoff_get(c, last_it->format, ti); - if ((wrap > 0) && !IS_AT_END(ti, (size_t) wrap)) - { - _layout_item_text_split_strip_white(c, ti, i, wrap); - } - else if ((wrap == 0) && (c->ln->items)) - { - last_it = _ITEM(EINA_INLIST_GET(c->ln->items)->last); - } - } - else if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) - { - /* We don't want to add this format item. */ - last_it = NULL; - } - - 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; - } - } -#else - (void) o; -#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_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->is_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->is_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 - * inside the list and then walk them on the next iteration. */ - for (i = c->par->logical_items ; i ; ) - { - int adv_line = 0; - int redo_item = 0; - it = _ITEM(eina_list_data_get(i)); - /* Skip visually deleted items */ - if (it->visually_deleted) - { - i = eina_list_next(i); - continue; - } - - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - _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) - { - /* If there are no text items yet, calc ascent/descent - * according to the current format. */ - if (c->maxascent + c->maxdescent == 0) - _layout_format_ascent_descent_adjust(c->obj, &c->maxascent, - &c->maxdescent, it->format); - - _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; - } - } - - - /* 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->adv) > - (c->w - c->o->style_pad.l - c->o->style_pad.r - - c->marginl - c->marginr)) || (wrap > 0))) - { - /* 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) || - (!it->format->wrap_word && !it->format->wrap_char && - !it->format->wrap_mixed))) - { - _layout_handle_ellipsis(c, it, i); - ret = 1; - goto end; - } - /* 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) - { - size_t line_start; - size_t it_len; - - it_len = (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) ? - 1 : _ITEM_TEXT(it)->text_props.text_len; - - -#ifdef HAVE_LINEBREAK - /* If we haven't calculated the linebreaks yet, - * do */ - if (!line_breaks) - { - /* Only relevant in those cases */ - if (it->format->wrap_word || it->format->wrap_mixed) - { - const char *lang; - lang = (it->format->font.fdesc) ? - it->format->font.fdesc->lang : ""; - size_t len = - eina_ustrbuf_length_get( - it->text_node->unicode); - line_breaks = malloc(len); - set_linebreaks_utf32((const utf32_t *) - eina_ustrbuf_string_get( - it->text_node->unicode), - len, lang, line_breaks); - } - } -#endif - if (c->ln->items) - line_start = c->ln->items->text_pos; - else - line_start = it->text_pos; - - adv_line = 1; - /* If we don't already have a wrap point from before */ - if (wrap < 0) - { - if (it->format->wrap_word) - wrap = _layout_get_wordwrap(c, it->format, it, - line_start, line_breaks); - else if (it->format->wrap_char) - wrap = _layout_get_charwrap(c, it->format, it, - line_start, line_breaks); - else if (it->format->wrap_mixed) - wrap = _layout_get_mixedwrap(c, it->format, it, - line_start, line_breaks); - else - 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 < it->text_pos) - { - /* Rollback latest additions, and cut that - item */ - i = eina_list_prev(i); - it = eina_list_data_get(i); - while (uwrap < it->text_pos) - { - c->ln->items = _ITEM( - eina_inlist_remove( - EINA_INLIST_GET(c->ln->items), - EINA_INLIST_GET(it))); - i = eina_list_prev(i); - it = eina_list_data_get(i); - } - c->x = it->x; - c->ln->items = _ITEM( - eina_inlist_remove( - EINA_INLIST_GET(c->ln->items), - EINA_INLIST_GET(it))); - continue; - } - /* If it points to the end, it means the previous - * char is a whitespace we should remove, so this - * is a wanted cutting point. */ - else if (uwrap > it->text_pos + it_len) - { - /* FIXME: Should redo the ellipsis handling. - * If we can do ellipsis, just cut here. */ - if (it->format->ellipsis == 1.0) - { - _layout_handle_ellipsis(c, it, i); - ret = 1; - goto end; - } - else - { - /* Delay the cut in a smart way i.e use the - item_pos as the line_start, because - there's already no cut before*/ - wrap = -1; - } - } - else - wrap -= it->text_pos; /* Cut here */ - } - - if (wrap > 0) - { - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - _layout_item_text_split_strip_white(c, - _ITEM_TEXT(it), i, wrap); - } - } - else if (wrap == 0) - { - /* Should wrap before the item */ - adv_line = 0; - redo_item = 1; - _layout_line_advance(c, it->format); - } - /* Reset wrap */ - wrap = -1; - } - } - - if (!redo_item && !it->visually_deleted) - { - 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; - /* 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->legacy_newline || - eina_list_next(i))) - { - adv_line = 1; - } - } - c->x += it->adv; - i = eina_list_next(i); - } - if (adv_line) - { - /* Each line is according to the first item in it, and here - * i is already the next item (or the current if we redo it) */ - if (i) - { - it = _ITEM(eina_list_data_get(i)); - } - _layout_line_advance(c, it->format); - } - } - if (c->ln->items) - { - /* Here 'it' is the last format used */ - _layout_line_finalize(c, it->format); - } - -end: -#ifdef HAVE_LINEBREAK - if (line_breaks) - free(line_breaks); -#endif - - return ret; -} - -/** - * @internal - * 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 c the working context. - */ -static inline void -_format_changes_invalidate_text_nodes(Ctxt *c) -{ - Evas_Object_Textblock_Node_Format *fnode = c->o->format_nodes; - Evas_Object_Textblock_Node_Text *start_n = NULL; - Eina_List *fstack = NULL; - int balance = 0; - while (fnode) - { - if (fnode->is_new) - { - const char *fstr = fnode->orig_format; - /* balance < 0 means we gave up and everything should be - * invalidated */ - if (fnode->opener && !fnode->own_closer) - { - balance++; - if (!fstack) - start_n = fnode->text_node; - fstack = eina_list_prepend(fstack, fnode); - } - else if (!fnode->opener) - { - size_t fstr_len; - fstr_len = strlen(fstr); - /* Generic popper, just pop */ - if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) - { - fstack = eina_list_remove_list(fstack, fstack); - balance--; - } - /* Find the matching format and pop it, if the matching format - * is out format, i.e the last one, pop and break. */ - else - { - Eina_List *i; - Evas_Object_Textblock_Node_Format *fnode2; - EINA_LIST_FOREACH(fstack, i, fnode2) - { - if (_FORMAT_IS_CLOSER_OF( - fnode2->orig_format, fstr, fstr_len)) - { - fstack = eina_list_remove_list(fstack, i); - break; - } - } - balance--; - } - - if (!fstack) - { - 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; - - 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); - } - - if (balance != 0) - { - while (start_n) - { - start_n->dirty = EINA_TRUE; - start_n = _NODE_TEXT(EINA_INLIST_GET(start_n)->next); - } - } -} - - -/** 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) - { - _format_changes_invalidate_text_nodes(c); - } - - if (o->content_changed) - { - 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) - { - Evas_Object_Textblock_Node_Format *fnode; - size_t start; - int off; - - /* If it's not a new paragraph, either update it or skip it. - * Remove all the paragraphs that were deleted */ - if (!n->is_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. - * Skip the unicode replacement chars when there are because - * we don't want to print them. */ - fnode = n->format_node; - start = off = 0; - while (fnode && (fnode->text_node == n)) - { - off += fnode->offset; - /* No need to skip on the first run, or a non-visible one */ - _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; - c->have_underline = 0; - c->have_underline2 = 0; - c->underline_extend = 0; - } - start += off; - if (fnode->visible) - { - off = -1; - start++; - } - else - { - off = 0; - } - fnode->is_new = EINA_FALSE; - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - } - _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; - } - -} - -/** - * @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 */ - { - Eina_Bool finalize = EINA_FALSE; - if ((c->o->style) && (c->o->style->default_tag)) - { - c->fmt = _layout_format_push(c, NULL, NULL); - _format_fill(c->obj, c->fmt, c->o->style->default_tag); - finalize = EINA_TRUE; - } - - if ((c->o->style_user) && (c->o->style_user->default_tag)) - { - if (!c->fmt) - { - c->fmt = _layout_format_push(c, NULL, NULL); - } - _format_fill(c->obj, c->fmt, c->o->style_user->default_tag); - finalize = EINA_TRUE; - } - - if (finalize) - _format_finalize(c->obj, c->fmt); - } - if (!c->fmt) - { - 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, EINA_TRUE); - o->paragraphs = c->paragraphs; - } - c->par = (Evas_Object_Textblock_Paragraph *) - EINA_INLIST_GET(c->paragraphs)->last; - if (!c->par->logical_items) - { - Evas_Object_Textblock_Text_Item *ti; - ti = _layout_text_item_new(c, c->fmt); - ti->parent.text_node = c->par->text_node; - ti->parent.text_pos = 0; - _layout_text_add_logical_item(c, ti, NULL); - } - - /* End of logical layout creation */ - - /* Start of visual layout creation */ - { - Evas_Object_Textblock_Paragraph *last_vis_par = NULL; - int par_index_step = o->num_paragraphs / TEXTBLOCK_PAR_INDEX_SIZE; - int par_count = 1; /* Force it to take the first one */ - int par_index_pos = 0; - - if (par_index_step == 0) par_index_step = 1; - - /* Clear all of the index */ - memset(o->par_index, 0, sizeof(o->par_index)); - - EINA_INLIST_FOREACH(c->paragraphs, c->par) - { - _layout_update_par(c); - - /* Break if we should stop here. */ - if (_layout_par(c)) - { - last_vis_par = c->par; - break; - } - - if ((par_index_pos < TEXTBLOCK_PAR_INDEX_SIZE) && (--par_count == 0)) - { - par_count = par_index_step; - - o->par_index[par_index_pos++] = c->par; - } - } - - /* 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; - } - - /* Clean the rest of the format stack */ - while (c->format_stack) - { - c->fmt = c->format_stack->data; - c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack); - _format_unref_free(c->obj, c->fmt); - } - - if (w_ret) *w_ret = c->wmax; - if (h_ret) *h_ret = c->hmax; - - /* Vertically align the textblock */ - if ((o->valign > 0.0) && (c->h > c->hmax)) - { - Evas_Coord adjustment = (c->h - c->hmax) * o->valign; - Evas_Object_Textblock_Paragraph *par; - EINA_INLIST_FOREACH(c->paragraphs, par) - { - par->y += adjustment; - } - } - - if ((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)) - { - 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; - _paragraphs_clear(obj, c->paragraphs); - _layout(obj, w, h, w_ret, h_ret); - } -} - -/* - * @internal - * Relayout the object according to current object size. - * - * @param obj the evas object - NOT NULL. - */ -static void -_relayout(const Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - _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; -} - -/** - * @internal - * Find the layout item and line that match the text node and position passed. - * - * @param obj the evas object - NOT NULL. - * @param n the text node - Not null. - * @param pos the position to look for - valid. - * @param[out] lnr the line found - not null. - * @param[out] tir the item found - not null. - * @see _find_layout_format_item_line_match() - */ -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 *found_par; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - if (!o->formatted.valid) _relayout(obj); - - 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; - - EINA_INLIST_FOREACH(ln->items, it) - { - /* FIXME: p should be size_t, same goes for pos */ - int p = (int) it->text_pos; - - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Object_Textblock_Text_Item *ti = - _ITEM_TEXT(it); - - p += (int) ti->text_props.text_len; - } - else - { - p++; - } - - if (((pos >= (int) it->text_pos) && (pos < p))) - { - *lnr = ln; - *itr = it; - return; - } - else if (p == pos) - { - *lnr = ln; - *itr = it; - } - } - } - } -} - -/** - * @internal - * Return the line number 'line'. - * - * @param obj the evas object - NOT NULL. - * @param line the line to find - * @return the line of line number or NULL if no line found. - */ -static Evas_Object_Textblock_Line * -_find_layout_line_num(const Evas_Object *obj, int line) -{ - Evas_Object_Textblock_Paragraph *par; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - - par = _layout_find_paragraph_by_line_no(o, line); - if (par) - { - _layout_paragraph_render(o, par); - EINA_INLIST_FOREACH(par->lines, ln) - { - if (par->line_no + ln->line_no == line) return ln; - } - } - return NULL; -} - -EAPI Evas_Object * -evas_object_textblock_add(Evas *e) -{ - Evas_Object *obj; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - obj = evas_object_new(e); - evas_object_textblock_init(obj); - evas_object_inject(obj, e); - return obj; -} - -EAPI Evas_Textblock_Style * -evas_textblock_style_new(void) -{ - Evas_Textblock_Style *ts; - - ts = calloc(1, sizeof(Evas_Textblock_Style)); - return ts; -} - -EAPI void -evas_textblock_style_free(Evas_Textblock_Style *ts) -{ - if (!ts) return; - if (ts->objects) - { - ts->delete_me = 1; - return; - } - _style_clear(ts); - free(ts); -} - -EAPI void -evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) -{ - Eina_List *l; - Evas_Object *obj; - - if (!ts) return; - /* If the style wasn't really changed, abort. */ - if ((!ts->style_text && !text) || - (ts->style_text && text && !strcmp(text, ts->style_text))) - return; - - EINA_LIST_FOREACH(ts->objects, l, obj) - { - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - _evas_textblock_invalidate_all(o); - _evas_textblock_changed(o, obj); - } - - _style_replace(ts, text); - - if (ts->style_text) - { - // format MUST be KEY='VALUE'[KEY='VALUE']... - const char *p; - const char *key_start, *key_stop, *val_start; - - key_start = key_stop = val_start = NULL; - p = ts->style_text; - while (*p) - { - if (!key_start) - { - if (!isspace((unsigned char)(*p))) - key_start = p; - } - else if (!key_stop) - { - if ((*p == '=') || (isspace((unsigned char)(*p)))) - key_stop = p; - } - else if (!val_start) - { - if (((*p) == '\'') && (*(p + 1))) - { - val_start = ++p; - } - } - if ((key_start) && (key_stop) && (val_start)) - { - char *tags, *replaces = NULL; - Evas_Object_Style_Tag *tag; - const char *val_stop = NULL; - size_t tag_len; - size_t replace_len; - - { - Eina_Strbuf *buf = eina_strbuf_new(); - val_stop = val_start; - while(*p) - { - if (*p == '\'') - { - /* Break if we found the tag end */ - if (p[-1] != '\\') - { - eina_strbuf_append_length(buf, val_stop, - p - val_stop); - break; - } - else - { - eina_strbuf_append_length(buf, val_stop, - p - val_stop - 1); - eina_strbuf_append_char(buf, '\''); - val_stop = p + 1; - } - } - p++; - } - replaces = eina_strbuf_string_steal(buf); - eina_strbuf_free(buf); - } - /* If we didn't find an end, just aboart. */ - if (!*p) - { - if (replaces) free(replaces); - break; - } - - tag_len = key_stop - key_start; - replace_len = val_stop - val_start; - - tags = malloc(tag_len + 1); - if (tags) - { - memcpy(tags, key_start, tag_len); - tags[tag_len] = 0; - } - - if ((tags) && (replaces)) - { - if (!strcmp(tags, "DEFAULT")) - { - ts->default_tag = replaces; - free(tags); - } - else - { - tag = calloc(1, sizeof(Evas_Object_Style_Tag)); - if (tag) - { - tag->tag.tag = tags; - tag->tag.replace = replaces; - tag->tag.tag_len = tag_len; - tag->tag.replace_len = replace_len; - ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - } - else - { - free(tags); - free(replaces); - } - } - } - else - { - if (tags) free(tags); - if (replaces) free(replaces); - } - key_start = key_stop = val_start = NULL; - } - p++; - } - } -} - -EAPI const char * -evas_textblock_style_get(const Evas_Textblock_Style *ts) -{ - if (!ts) return NULL; - return ts->style_text; -} - -/* textblock styles */ - -static void -_textblock_style_generic_set(Evas_Object *obj, Evas_Textblock_Style *ts, - Evas_Textblock_Style **obj_ts) -{ - TB_HEAD(); - if (ts == *obj_ts) return; - if ((ts) && (ts->delete_me)) return; - if (*obj_ts) - { - Evas_Textblock_Style *old_ts; - if (o->markup_text) - { - free(o->markup_text); - o->markup_text = NULL; - } - - old_ts = *obj_ts; - old_ts->objects = eina_list_remove(old_ts->objects, obj); - if ((old_ts->delete_me) && (!old_ts->objects)) - evas_textblock_style_free(old_ts); - } - if (ts) - { - ts->objects = eina_list_append(ts->objects, obj); - } - *obj_ts = ts; - - _evas_textblock_invalidate_all(o); - _evas_textblock_changed(o, obj); -} - -EAPI void -evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) -{ - TB_HEAD(); - _textblock_style_generic_set(obj, ts, &(o->style)); -} - -EAPI const Evas_Textblock_Style * -evas_object_textblock_style_get(const Evas_Object *obj) -{ - TB_HEAD_RETURN(NULL); - return o->style; -} - -EAPI void -evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) -{ - TB_HEAD(); - _textblock_style_generic_set(obj, ts, &(o->style_user)); -} - -EAPI const Evas_Textblock_Style * -evas_object_textblock_style_user_peek(const Evas_Object *obj) -{ - TB_HEAD_RETURN(NULL); - return o->style_user; -} - -EAPI void -evas_object_textblock_style_user_pop(Evas_Object *obj) -{ - TB_HEAD(); - _textblock_style_generic_set(obj, NULL, &(o->style_user)); -} - -EAPI void -evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) -{ - TB_HEAD(); - if (o->repch) eina_stringshare_del(o->repch); - if (ch) o->repch = eina_stringshare_add(ch); - else o->repch = NULL; - _evas_textblock_invalidate_all(o); - _evas_textblock_changed(o, obj); -} - -EAPI void -evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) -{ - TB_HEAD(); - if (o->legacy_newline == mode) - return; - - o->legacy_newline = mode; - /* FIXME: Should recreate all the textnodes... For now, it's just - * for new text inserted. */ -} - -EAPI Eina_Bool -evas_object_textblock_legacy_newline_get(const Evas_Object *obj) -{ - TB_HEAD_RETURN(EINA_FALSE); - return o->legacy_newline; -} - -EAPI void -evas_object_textblock_valign_set(Evas_Object *obj, double align) -{ - TB_HEAD(); - if (align < 0.0) align = 0.0; - else if (align > 1.0) align = 1.0; - if (o->valign == align) return; - o->valign = align; - _evas_textblock_changed(o, obj); -} - -EAPI double -evas_object_textblock_valign_get(const Evas_Object *obj) -{ - TB_HEAD_RETURN(0.0); - return o->valign; -} - -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) -{ - TB_HEAD_RETURN(NULL); - return o->repch; -} - -/** - * @internal - * Advance p_buff to point after the end of the string. It's used with the - * @ref escaped_strings[] variable. - * - * @param p_buff the pointer to the current string. - */ -static inline void -_escaped_advance_after_end_of_string(const char **p_buf) -{ - while (**p_buf != 0) (*p_buf)++; - (*p_buf)++; -} - -/** - * @internal - * Advance p_buff to point after the end of the string. It's used with the - * @ref escaped_strings[] variable. Also chec if matches. - * FIXME: doc. - * - * @param p_buff the pointer to the current string. - */ -static inline int -_escaped_is_eq_and_advance(const char *s, const char *s_end, - const char **p_m, const char *m_end) -{ - Eina_Bool reached_end; - for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++) - { - if (*s != **p_m) - { - _escaped_advance_after_end_of_string(p_m); - return 0; - } - } - - reached_end = !**p_m; - if (*p_m < m_end) - _escaped_advance_after_end_of_string(p_m); - - return ((s == s_end) && reached_end); -} - -/** - * @internal - * - * @param s the string to match - */ -static inline const char * -_escaped_char_match(const char *s, int *adv) -{ - const char *map_itr, *map_end, *mc, *sc; - - map_itr = escape_strings; - map_end = map_itr + sizeof(escape_strings); - - while (map_itr < map_end) - { - const char *escape; - int match; - - escape = map_itr; - _escaped_advance_after_end_of_string(&map_itr); - if (map_itr >= map_end) break; - - mc = map_itr; - sc = s; - match = 1; - while ((*mc) && (*sc)) - { - if ((unsigned char)*sc < (unsigned char)*mc) return NULL; - if (*sc != *mc) - { - match = 0; - break; - } - mc++; - sc++; - } - if (match) - { - *adv = mc - map_itr; - return escape; - } - _escaped_advance_after_end_of_string(&map_itr); - } - return NULL; -} - -/** - * @internal - * FIXME: TBD. - * - * @param s the string to match - */ -static inline const char * -_escaped_char_get(const char *s, const char *s_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 "&#" */ - - if (tolower((unsigned char)(*s)) == 'x') - { - s++; - base = 16; - } - - 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 - { - 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; -} - -EAPI const char * -evas_textblock_escape_string_get(const char *escape) -{ - /* & -> & */ - return _escaped_char_get(escape, escape + strlen(escape)); -} - -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); -} - -EAPI const char * -evas_textblock_string_escape_get(const char *string, int *len_ret) -{ - /* & -> & */ - return _escaped_char_match(string, len_ret); -} - -/** - * @internal - * Appends the escaped char beteewn s and s_end to the curosr - * - * - * @param s the start of the string - * @param s_end the end of the string. - */ -static inline void -_append_escaped_char(Evas_Textblock_Cursor *cur, const char *s, - const char *s_end) -{ - const char *escape; - - escape = _escaped_char_get(s, s_end); - if (escape) - evas_textblock_cursor_text_append(cur, escape); -} - -/** - * @internal - * prepends the escaped char beteewn s and s_end to the curosr - * - * - * @param s the start of the string - * @param s_end the end of the string. - */ -static inline void -_prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s, - const char *s_end) -{ - const char *escape; - - escape = _escaped_char_get(s, s_end); - if (escape) - evas_textblock_cursor_text_prepend(cur, escape); -} - - -EAPI void -evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) -{ - TB_HEAD(); - if ((text != o->markup_text) && (o->markup_text)) - { - free(o->markup_text); - o->markup_text = NULL; - } - _nodes_clear(obj); - if (!o->style && !o->style_user) - { - if (text != o->markup_text) - { - if (text) o->markup_text = strdup(text); - } - return; - } - evas_textblock_cursor_paragraph_first(o->cursor); - - evas_object_textblock_text_markup_prepend(o->cursor, text); - /* Point all the cursors to the starrt */ - { - Eina_List *l; - Evas_Textblock_Cursor *data; - - evas_textblock_cursor_paragraph_first(o->cursor); - EINA_LIST_FOREACH(o->cursors, l, data) - evas_textblock_cursor_paragraph_first(data); - } -} - -EAPI void -evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) -{ - Evas_Object *obj = cur->obj; - TB_HEAD(); - if (text) - { - char *s, *p; - char *tag_start, *tag_end, *esc_start, *esc_end; - - tag_start = tag_end = esc_start = esc_end = NULL; - p = (char *)text; - s = p; - /* This loop goes through all of the mark up text until it finds format - * tags, escape sequences or the terminating NULL. When it finds either - * of those, it appends the text found up until that point to the textblock - * proccesses whatever found. It repeats itself until the termainating - * NULL is reached. */ - for (;;) - { - size_t text_len; - /* If we got to the end of string or just finished/started tag - * or escape sequence handling. */ - if ((*p == 0) || - (tag_end) || (esc_end) || - (tag_start) || (esc_start)) - { - if (tag_end) - { - /* If we reached to a tag ending, analyze the tag */ - char *ttag; - size_t ttag_len = tag_end - tag_start; - - - ttag = malloc(ttag_len + 1); - if (ttag) - { - memcpy(ttag, tag_start, ttag_len); - ttag[ttag_len] = 0; - evas_textblock_cursor_format_prepend(cur, ttag); - free(ttag); - } - tag_start = tag_end = NULL; - } - else if (esc_end) - { - _prepend_escaped_char(cur, esc_start, esc_end + 1); - esc_start = esc_end = NULL; - } - else if (*p == 0) - { - _prepend_text_run(cur, s, p); - s = NULL; - } - if (*p == 0) - break; - } - if (*p == '<') - { - if (!esc_start) - { - /* Append the text prior to this to the textblock and mark - * the start of the tag */ - tag_start = p; - tag_end = NULL; - _prepend_text_run(cur, s, p); - s = NULL; - } - } - else if (*p == '>') - { - if (tag_start) - { - tag_end = p + 1; - s = p + 1; - } - } - else if (*p == '&') - { - if (!tag_start) - { - /* Append the text prior to this to the textblock and mark - * the start of the escape sequence */ - esc_start = p; - esc_end = NULL; - _prepend_text_run(cur, s, p); - s = NULL; - } - } - else if (*p == ';') - { - if (esc_start) - { - esc_end = p; - s = p + 1; - } - } - /* Unicode object replcament char */ - else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p, - text_len = strlen(_REPLACEMENT_CHAR_UTF8)) || - !strncmp(_NEWLINE_UTF8, p, - text_len = strlen(_NEWLINE_UTF8)) || - !strncmp(_TAB_UTF8, p, - text_len = strlen(_TAB_UTF8)) || - !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p, - text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8))) - { - /*FIXME: currently just remove them, maybe do something - * fancier in the future, atm it breaks if this char - * is inside <> */ - _prepend_text_run(cur, s, p); - /* it's also advanced later in this loop need +text_len - in total*/ - p += text_len - 1; - s = p + 1; /* One after the end of the replacement char */ - } - p++; - } - } - _evas_textblock_changed(o, obj); -} - - -/** - * @internal - * An helper function to markup get. Appends the format from fnode to the strbugf txt. - * - * @param o the textblock object. - * @param txt the strbuf to append to. - * @param fnode the format node to process. - */ -static void -_markup_get_format_append(Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) -{ - eina_strbuf_append_char(txt, '<'); - { - const char *s; - - // FIXME: need to escape - s = fnode->orig_format; - if (!fnode->opener && !fnode->own_closer) - eina_strbuf_append_char(txt, '/'); - eina_strbuf_append(txt, s); - if (fnode->own_closer) - eina_strbuf_append_char(txt, '/'); - } - eina_strbuf_append_char(txt, '>'); -} - -/** - * @internal - * An helper function to markup get. Appends the text in text. - * - * @param txt the strbuf to append to. - * @param text the text to process. - */ -static void -_markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text) -{ - char *p = eina_unicode_unicode_to_utf8(text, NULL); - char *base = p; - while (*p) - { - const char *escape; - int adv; - - escape = _escaped_char_match(p, &adv); - if (escape) - { - p += adv; - eina_strbuf_append(txt, escape); - } - else - { - eina_strbuf_append_char(txt, *p); - p++; - } - } - free(base); -} -EAPI const char * -evas_object_textblock_text_markup_get(const Evas_Object *obj) -{ - Evas_Object_Textblock_Node_Text *n; - Eina_Strbuf *txt = NULL; - - TB_HEAD_RETURN(NULL); - if (o->markup_text) return(o->markup_text); - txt = eina_strbuf_new(); - EINA_INLIST_FOREACH(o->text_nodes, n) - { - Evas_Object_Textblock_Node_Format *fnode; - Eina_Unicode *text_base, *text; - int off; - - /* 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. - * Skip the unicode replacement chars when there are because - * we don't want to print them. */ - text_base = text = - eina_unicode_strndup(eina_ustrbuf_string_get(n->unicode), - eina_ustrbuf_length_get(n->unicode)); - fnode = n->format_node; - off = 0; - while (fnode && (fnode->text_node == n)) - { - Eina_Unicode tmp_ch; - off += fnode->offset; - /* No need to skip on the first run */ - tmp_ch = text[off]; - text[off] = 0; /* Null terminate the part of the string */ - _markup_get_text_append(txt, text); - _markup_get_format_append(txt, fnode); - text[off] = tmp_ch; /* Restore the char */ - text += off; - if (fnode->visible) - { - off = -1; - text++; - } - else - { - off = 0; - } - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - } - /* Add the rest, skip replacement */ - _markup_get_text_append(txt, text); - free(text_base); - } - - - o->markup_text = eina_strbuf_string_steal(txt); - eina_strbuf_free(txt); - return o->markup_text; -} - -EAPI char * -evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) -{ - /* FIXME: Redundant and awful, should be merged with markup_prepend */ - Eina_Strbuf *sbuf; - char *s, *p, *ret; - char *tag_start, *tag_end, *esc_start, *esc_end; - - if (!text) return NULL; - - - tag_start = tag_end = esc_start = esc_end = NULL; - sbuf = eina_strbuf_new(); - p = (char *)text; - s = p; - /* This loop goes through all of the mark up text until it finds format - * tags, escape sequences or the terminating NULL. When it finds either - * of those, it appends the text found up until that point to the textblock - * proccesses whatever found. It repeats itself until the termainating - * NULL is reached. */ - for (;;) - { - /* If we got to the end of string or just finished/started tag - * or escape sequence handling. */ - if ((*p == 0) || - (tag_end) || (esc_end) || - (tag_start) || (esc_start)) - { - if (tag_end) - { - /* If we reached to a tag ending, analyze the tag */ - char *ttag; - size_t ttag_len; - - tag_start++; /* Skip the < */ - tag_end--; /* Skip the > */ - if ((tag_end > tag_start) && (*(tag_end - 1) == '/')) - { - tag_end --; /* Skip the terminating '/' */ - while (*(tag_end - 1) == ' ') - tag_end--; /* skip trailing ' ' */ - } - - ttag_len = tag_end - tag_start; - - ttag = malloc(ttag_len + 1); - if (ttag) - { - const char *match = NULL; - size_t replace_len; - memcpy(ttag, tag_start, ttag_len); - ttag[ttag_len] = 0; - - - if (obj) - { - match = _style_match_tag( - evas_object_textblock_style_get(obj), - ttag, ttag_len, &replace_len); - } - - if (!match) match = ttag; - - if (_IS_PARAGRAPH_SEPARATOR_SIMPLE(match)) - eina_strbuf_append(sbuf, _PARAGRAPH_SEPARATOR_UTF8); - else if (_IS_LINE_SEPARATOR(match)) - eina_strbuf_append(sbuf, _NEWLINE_UTF8); - else if (_IS_TAB(match)) - eina_strbuf_append(sbuf, _TAB_UTF8); - else if (!strncmp(match, "item", 4)) - eina_strbuf_append(sbuf, _REPLACEMENT_CHAR_UTF8); - - free(ttag); - } - tag_start = tag_end = NULL; - } - else if (esc_end) - { - const char *escape; - - escape = _escaped_char_get(esc_start, esc_end + 1); - if (escape) eina_strbuf_append(sbuf, escape); - esc_start = esc_end = NULL; - } - else if (*p == 0) - { - eina_strbuf_append_length(sbuf, s, p - s); - s = NULL; - } - if (*p == 0) - break; - } - if (*p == '<') - { - if (!esc_start) - { - /* Append the text prior to this to the textblock and - * mark the start of the tag */ - tag_start = p; - tag_end = NULL; - eina_strbuf_append_length(sbuf, s, p - s); - s = NULL; - } - } - else if (*p == '>') - { - if (tag_start) - { - tag_end = p + 1; - s = p + 1; - } - } - else if (*p == '&') - { - if (!tag_start) - { - /* Append the text prior to this to the textblock and mark - * the start of the escape sequence */ - esc_start = p; - esc_end = NULL; - eina_strbuf_append_length(sbuf, s, p - s); - s = NULL; - } - } - else if (*p == ';') - { - if (esc_start) - { - esc_end = p; - s = p + 1; - } - } - p++; - } - - ret = eina_strbuf_string_steal(sbuf); - eina_strbuf_free(sbuf); - return ret; -} - -EAPI char * -evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) -{ - Eina_Strbuf *sbuf; - char *str = NULL; - int ch, pos = 0, pos2 = 0; - - (void) obj; - - if (!text) return NULL; - - sbuf = eina_strbuf_new(); - - for (;;) - { - pos = pos2; - pos2 = evas_string_char_next_get(text, pos2, &ch); - if ((ch <= 0) || (pos2 <= 0)) break; - - if (ch == _NEWLINE) - eina_strbuf_append(sbuf, "
"); - else if (ch == _TAB) - eina_strbuf_append(sbuf, ""); - else if (ch == '<') - eina_strbuf_append(sbuf, "<"); - else if (ch == '>') - eina_strbuf_append(sbuf, ">"); - else if (ch == '&') - eina_strbuf_append(sbuf, "&"); - else if (ch == _PARAGRAPH_SEPARATOR) - eina_strbuf_append(sbuf, ""); - else if (ch == _REPLACEMENT_CHAR) - eina_strbuf_append(sbuf, ""); - else - { - eina_strbuf_append_length(sbuf, text + pos, pos2 - pos); - } - } - str = eina_strbuf_string_steal(sbuf); - eina_strbuf_free(sbuf); - return str; - -} - -/* cursors */ - -/** - * @internal - * Merge the current node with the next, no need to remove PS, already - * not there. - * - * @param o the text block object. - * @param to merge into to. - */ -static void -_evas_textblock_nodes_merge(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *to) -{ - Evas_Object_Textblock_Node_Format *itr; - Evas_Object_Textblock_Node_Format *pnode; - Evas_Object_Textblock_Node_Text *from; - const Eina_Unicode *text; - int to_len, len; - - if (!to) return; - from = _NODE_TEXT(EINA_INLIST_GET(to)->next); - - to_len = eina_ustrbuf_length_get(to->unicode); - text = eina_ustrbuf_string_get(from->unicode); - len = eina_ustrbuf_length_get(from->unicode); - eina_ustrbuf_append_length(to->unicode, text, len); - - itr = from->format_node; - if (itr && (itr->text_node == from)) - { - pnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->prev); - if (pnode && (pnode->text_node == to)) - { - itr->offset += to_len - _evas_textblock_node_format_pos_get(pnode); - } - else - { - itr->offset += to_len; - } - } - - while (itr && (itr->text_node == from)) - { - itr->text_node = to; - itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); - } - if (!to->format_node || (to->format_node->text_node != to)) - { - to->format_node = from->format_node; - } - - /* 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->is_new = EINA_TRUE; - - _evas_textblock_cursors_set_node(o, from, to); - _evas_textblock_node_text_remove(o, from); -} - -/** - * @internal - * Merge the current node with the next, no need to remove PS, already - * not there. - * - * @param cur the cursor that points to the current node - */ -static void -_evas_textblock_cursor_nodes_merge(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock_Node_Text *nnode; - Evas_Object_Textblock *o; - int len; - if (!cur) return; - - len = eina_ustrbuf_length_get(cur->node->unicode); - - o = (Evas_Object_Textblock *)(cur->obj->object_data); - nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next); - _evas_textblock_nodes_merge(o, cur->node); - _evas_textblock_cursors_update_offset(cur, nnode, 0, len); - _evas_textblock_cursors_set_node(o, nnode, cur->node); - if (nnode == o->cursor->node) - { - o->cursor->node = cur->node; - o->cursor->pos += len; - } -} - -/** - * @internal - * Return the format at a specific position. - * - * @param cur the cursor to the position. - * @return the format node at the specific position or NULL if not found. - */ -static Evas_Object_Textblock_Node_Format * -_evas_textblock_cursor_node_format_at_pos_get(const Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock_Node_Format *node; - Evas_Object_Textblock_Node_Format *itr; - int position = 0; - - if (!cur->node) return NULL; - - node = cur->node->format_node; - if (!node) return NULL; - /* If there is no exclusive format node to this paragraph return the - * previous's node */ - /* Find the main format node */ - EINA_INLIST_FOREACH(node, itr) - { - if (itr->text_node != cur->node) - { - return NULL; - } - if ((position + itr->offset) == cur->pos) - { - return itr; - } - position += itr->offset; - } - return NULL; -} - -/** - * @internal - * Return the last format node at the position of the format node n. - * - * @param n a format node at the position. - * @return the last format node at the position of n. - */ -static Evas_Object_Textblock_Node_Format * -_evas_textblock_node_format_last_at_off(const Evas_Object_Textblock_Node_Format *n) -{ - const Evas_Object_Textblock_Node_Format *nnode; - const Evas_Object_Textblock_Node_Text *tnode; - if (!n) return NULL; - nnode = n; - tnode = n->text_node; - do - { - n = nnode; - nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); - } - while (nnode && (nnode->text_node == tnode) && (nnode->offset == 0)); - - return (Evas_Object_Textblock_Node_Format *) n; -} - -/** - * @internal - * Returns the visible format at a specific location. - * - * @param n a format at the specific position. - * @return the format node at the specific position or NULL if not found. - */ -static Evas_Object_Textblock_Node_Format * -_evas_textblock_node_visible_at_pos_get(const Evas_Object_Textblock_Node_Format *n) -{ - const Evas_Object_Textblock_Node_Format *nnode; - if (!n) return NULL; - /* The visible format is the last one, because it inserts a replacement - * char that advances the next formats. */ - - nnode = n; - do - { - n = nnode; - if (n->visible) return (Evas_Object_Textblock_Node_Format *) n; - nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); - } - while (nnode && (nnode->offset == 0)); - - return NULL; -} - -/** - * @internal - * Return the last format that applies to a specific cursor or at the specific - * position the cursor points to. This means either a cursor at or before the - * position of the cursor in the text node is returned or the previous's text - * node's format node. - * - * @param cur the position to look at. - * @return the format node found. - */ -static Evas_Object_Textblock_Node_Format * -_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock_Node_Format *node, *pitr = NULL; - Evas_Object_Textblock_Node_Format *itr; - size_t position = 0; - - if (!cur->node) return NULL; - - node = cur->node->format_node; - if (!node) return NULL; - /* If there is no exclusive format node to this paragraph return the - * previous's node */ - if (node->text_node != cur->node) - { - return node; - } - else if (node->offset > cur->pos) - { - return _NODE_FORMAT(EINA_INLIST_GET(node)->prev); - } - /* Find the main format node */ - pitr = _NODE_FORMAT(EINA_INLIST_GET(node)->prev); - EINA_INLIST_FOREACH(node, itr) - { - if ((itr->text_node != cur->node) || - ((position + itr->offset) > cur->pos)) - { - return pitr; - } - else if ((position + itr->offset) == cur->pos) - { - return itr; - } - pitr = itr; - position += itr->offset; - } - return pitr; -} - -/** - * @internal - * Find the layout item and line that match the cursor. - * - * @param cur the cursor we are currently at. - NOT NULL. - * @param[out] lnr the line found - not null. - * @param[out] itr the item found - not null. - * @return EINA_TRUE if we matched the previous format, EINA_FALSE otherwise. - */ -static Eina_Bool -_find_layout_item_match(const Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) -{ - Evas_Textblock_Cursor cur2; - Eina_Bool previous_format = EINA_FALSE; - - cur2.obj = cur->obj; - evas_textblock_cursor_copy(cur, &cur2); - if (cur2.pos > 0) - { - cur2.pos--; - } - - if (_evas_textblock_cursor_is_at_the_end(cur) && - evas_textblock_cursor_format_is_visible_get(&cur2)) - { - _find_layout_item_line_match(cur2.obj, cur2.node, cur2.pos, lnr, itr); - previous_format = EINA_TRUE; - } - else - { - _find_layout_item_line_match(cur->obj, cur->node, cur->pos, lnr, itr); - } - return previous_format; -} - -EAPI Evas_Textblock_Cursor * -evas_object_textblock_cursor_get(const Evas_Object *obj) -{ - TB_HEAD_RETURN(NULL); - return o->cursor; -} - -EAPI Evas_Textblock_Cursor * -evas_object_textblock_cursor_new(const Evas_Object *obj) -{ - Evas_Textblock_Cursor *cur; - - TB_HEAD_RETURN(NULL); - cur = calloc(1, sizeof(Evas_Textblock_Cursor)); - cur->obj = (Evas_Object *) obj; - cur->node = o->text_nodes; - cur->pos = 0; - - o->cursors = eina_list_append(o->cursors, cur); - return cur; -} - -EAPI void -evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - - if (!cur) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (cur == o->cursor) return; - o->cursors = eina_list_remove(o->cursors, cur); - free(cur); -} - -EAPI Eina_Bool -evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) -{ - if (!cur || !cur->node) return EINA_FALSE; - return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ? - EINA_TRUE : EINA_FALSE; -} - -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; -} - -EAPI const Evas_Object_Textblock_Node_Format * -evas_textblock_node_format_last_get(const Evas_Object *obj) -{ - TB_HEAD_RETURN(NULL); - if (o->format_nodes) - { - return _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last); - } - return 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); -} - -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); -} - -EAPI void -evas_textblock_node_format_remove_pair(Evas_Object *obj, - Evas_Object_Textblock_Node_Format *n) -{ - Evas_Object_Textblock_Node_Text *tnode1; - Evas_Object_Textblock_Node_Format *fmt, *found_node = NULL; - Eina_List *fstack = NULL; - TB_HEAD(); - - if (!n) return; - - fmt = n; - - do - { - const char *fstr = fmt->orig_format; - - if (fmt->opener && !fmt->own_closer) - { - fstack = eina_list_prepend(fstack, fmt); - } - else if (fstr && !fmt->opener) - { - size_t fstr_len; - fstr_len = strlen(fstr); - /* Generic popper, just pop */ - if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) - { - fstack = eina_list_remove_list(fstack, fstack); - if (!fstack) - { - found_node = fmt; - goto found; - } - } - /* Find the matching format and pop it, if the matching format - * is out format, i.e the last one, pop and break. */ - else - { - Eina_List *i; - Evas_Object_Textblock_Node_Format *fnode; - EINA_LIST_FOREACH(fstack, i, fnode) - { - if (_FORMAT_IS_CLOSER_OF( - fnode->orig_format, fstr, fstr_len)) - { - /* Last one, this is our item! */ - if (!eina_list_next(i)) - { - found_node = fmt; - goto found; - } - fstack = eina_list_remove_list(fstack, i); - break; - } - } - } - } - - fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); - } - while (fmt && fstack); - -found: - - fstack = eina_list_free(fstack); - - if (n->visible) - { - 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, ind, ind + 1); - if (format && _IS_PARAGRAPH_SEPARATOR(o, format)) - { - evas_textblock_cursor_at_format_set(&cur, n); - _evas_textblock_cursor_nodes_merge(&cur); - } - _evas_textblock_cursors_update_offset(&cur, n->text_node, ind, -1); - } - tnode1 = n->text_node; - _evas_textblock_node_format_remove(o, n, 0); - if (found_node && (found_node != n)) - { - Evas_Object_Textblock_Node_Text *tnode2; - tnode2 = found_node->text_node; - /* found_node can never be visible! (it's the closing format) */ - _evas_textblock_node_format_remove(o, found_node, 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_changed(o, obj); -} - -EAPI void -evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - if (!cur) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - cur->node = o->text_nodes; - cur->pos = 0; - -} - -EAPI void -evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *node; - - if (!cur) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - node = o->text_nodes; - if (node) - { - node = _NODE_TEXT(EINA_INLIST_GET(node)->last); - cur->node = node; - cur->pos = 0; - - evas_textblock_cursor_paragraph_char_last(cur); - } - else - { - cur->node = NULL; - cur->pos = 0; - - } -} - -EAPI Eina_Bool -evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) -{ - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - /* If there is a current text node, return the next text node (if exists) - * otherwise, just return False. */ - if (cur->node) - { - Evas_Object_Textblock_Node_Text *nnode; - nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next); - if (nnode) - { - cur->node = nnode; - cur->pos = 0; - - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -EAPI Eina_Bool -evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock_Node_Text *node; - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - /* If the current node is a text node, just get the prev if any, - * if it's a format, get the current text node out of the format and return - * the prev text node if any. */ - node = cur->node; - /* If there is a current text node, return the prev text node - * (if exists) otherwise, just return False. */ - if (node) - { - Evas_Object_Textblock_Node_Text *pnode; - pnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->prev); - if (pnode) - { - cur->node = pnode; - evas_textblock_cursor_paragraph_char_last(cur); - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -EAPI void -evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) -{ - evas_textblock_cursor_at_format_set(cur, n); -} - -EAPI Eina_Bool -evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock_Node_Format *node; - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - /* If the current node is a format node, just get the next if any, - * if it's a text, get the current format node out of the text and return - * the next format node if any. */ - node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); - node = _evas_textblock_node_format_last_at_off(node); - if (!node) - { - if (cur->node->format_node) - { - cur->pos = _evas_textblock_node_format_pos_get(node); - return EINA_TRUE; - } - } - /* If there is a current text node, return the next format node (if exists) - * otherwise, just return False. */ - else - { - Evas_Object_Textblock_Node_Format *nnode; - nnode = _NODE_FORMAT(EINA_INLIST_GET(node)->next); - if (nnode) - { - cur->node = nnode->text_node; - cur->pos = _evas_textblock_node_format_pos_get(nnode); - - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -EAPI Eina_Bool -evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) -{ - const Evas_Object_Textblock_Node_Format *node; - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - node = evas_textblock_cursor_format_get(cur); - if (!node) - { - node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); - if (node) - { - cur->node = node->text_node; - cur->pos = _evas_textblock_node_format_pos_get(node); - - return EINA_TRUE; - } - } - /* If there is a current text node, return the next text node (if exists) - * otherwise, just return False. */ - if (node) - { - Evas_Object_Textblock_Node_Format *pnode; - pnode = _NODE_FORMAT(EINA_INLIST_GET(node)->prev); - if (pnode) - { - cur->node = pnode->text_node; - cur->pos = _evas_textblock_node_format_pos_get(pnode); - - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -#ifdef HAVE_LINEBREAK - -/* BREAK_AFTER: true if we can break after the current char. - * Both macros assume str[i] is not the terminating nul */ -#define BREAK_AFTER(i) \ - (breaks[i] == WORDBREAK_BREAK) - -#else - -#define BREAK_AFTER(i) \ - ((!text[i + 1]) || \ - (_is_white(text[i]) && !_is_white(text[i + 1])) || \ - (!_is_white(text[i]) && _is_white(text[i + 1]))) - -#endif - -EAPI Eina_Bool -evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) -{ - const Eina_Unicode *text; - size_t i; -#ifdef HAVE_LINEBREAK - char *breaks; -#endif - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - - text = eina_ustrbuf_string_get(cur->node->unicode); - -#ifdef HAVE_LINEBREAK - { - const char *lang = ""; /* FIXME: get lang */ - size_t len = eina_ustrbuf_length_get(cur->node->unicode); - breaks = malloc(len); - set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); - } -#endif - - i = cur->pos; - - /* Skip the first one. This ensures we don't point to the nul, and also - * we just don't care about it anyway. */ - if (i > 0) i--; - - for ( ; i > 0 ; i--) - { - if (BREAK_AFTER(i)) - { - /* Advance to the current char */ - i++; - break; - } - } - - cur->pos = i; - -#ifdef HAVE_LINEBREAK - free(breaks); -#endif - return EINA_TRUE; -} - -EAPI Eina_Bool -evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) -{ - const Eina_Unicode *text; - size_t i; -#ifdef HAVE_LINEBREAK - char *breaks; -#endif - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - - text = eina_ustrbuf_string_get(cur->node->unicode); - -#ifdef HAVE_LINEBREAK - { - const char *lang = ""; /* FIXME: get lang */ - size_t len = eina_ustrbuf_length_get(cur->node->unicode); - breaks = malloc(len); - set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); - } -#endif - - i = cur->pos; - - for ( ; text[i] ; i++) - { - if (BREAK_AFTER(i)) - { - /* This is the one to break after. */ - break; - } - } - - cur->pos = i; - -#ifdef HAVE_LINEBREAK - free(breaks); -#endif - return EINA_TRUE;; -} - -EAPI Eina_Bool -evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) -{ - int ind; - const Eina_Unicode *text; - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - - ind = cur->pos; - text = eina_ustrbuf_string_get(cur->node->unicode); - 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[ind]) - { - cur->pos = ind; - return EINA_TRUE; - } - else - { - if (!evas_textblock_cursor_paragraph_next(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) ind) - return EINA_FALSE; - - cur->pos = ind; - return EINA_TRUE; - } - else - { - return EINA_TRUE; - } - } -} - -EAPI Eina_Bool -evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) -{ - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - - if (cur->pos != 0) - { - cur->pos--; - return EINA_TRUE; - } - return evas_textblock_cursor_paragraph_prev(cur); -} - -EAPI void -evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) -{ - if (!cur) return; - cur->pos = 0; - -} - -EAPI void -evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) -{ - int ind; - - if (!cur) return; - if (!cur->node) return; - ind = eina_ustrbuf_length_get(cur->node->unicode); - /* If it's not the last paragraph, go back one, because we want to point - * to the PS, not the NULL */ - if (EINA_INLIST_GET(cur->node)->next) - ind--; - - if (ind >= 0) - cur->pos = ind; - else - cur->pos = 0; - -} - -EAPI void -evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln = NULL; - Evas_Object_Textblock_Item *it = NULL; - - if (!cur) return; - if (!cur->node) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - - _find_layout_item_match(cur, &ln, &it); - - if (!ln) return; - if (ln->items) - { - Evas_Object_Textblock_Item *i; - it = ln->items; - EINA_INLIST_FOREACH(ln->items, i) - { - if (it->text_pos > i->text_pos) - { - it = i; - } - } - } - if (it) - { - cur->pos = it->text_pos; - cur->node = it->text_node; - } -} - -EAPI void -evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln = NULL; - Evas_Object_Textblock_Item *it = NULL; - - if (!cur) return; - if (!cur->node) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - - _find_layout_item_match(cur, &ln, &it); - - if (!ln) return; - if (ln->items) - { - Evas_Object_Textblock_Item *i; - it = ln->items; - EINA_INLIST_FOREACH(ln->items, i) - { - if (it->text_pos < i->text_pos) - { - it = i; - } - } - } - if (it) - { - size_t ind; - - cur->node = it->text_node; - cur->pos = it->text_pos; - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - 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) - { - cur->pos++; - } - } -} - -/** - * @internal - * checks if a format (as a string) is visible/changes format and sets the - * fnode properties accordingly. - * - * @param fnode the format node - * @param s the string. - */ -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; - - fnode->visible = fnode->format_change = EINA_FALSE; - fnode->anchor = ANCHOR_NONE; - if (!s) return; - - if (!fnode->own_closer) - { - is_opener = fnode->opener; - fnode->format_change = EINA_TRUE; - } - - while ((item = _format_parse(&s))) - { - 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 ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) || - (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) || - (!strncmp(item, "br", itlen) && (itlen >= 2)) || - (!strncmp(item, "tab", itlen) && (itlen >= 3)) || - (!strncmp(item, "ps", itlen) && (itlen >= 2)) || - (!strncmp(item, "item", itlen) && (itlen >= 4) && is_opener)) - { - fnode->visible = EINA_TRUE; - } - - if (is_opener && !strncmp(item, "a", itlen)) - { - fnode->anchor = ANCHOR_A; - } - else if (is_opener && !strncmp(item, "item", itlen) && (itlen >= 4)) - { - fnode->anchor = ANCHOR_ITEM; - } - } -} - -/** - * Sets the cursor to the position of where the fmt points to. - * - * @param cur the cursor to update. - * @param fmt the format to set according to. - * @return nothing. - */ -static void __UNUSED__ -_evas_textblock_cursor_node_text_at_format(Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Node_Format *fmt) -{ - Evas_Object_Textblock_Node_Text *text; - Evas_Object_Textblock_Node_Format *base_format; - Evas_Object_Textblock_Node_Format *itr; - size_t position = 0; - - if (!cur || !fmt) return; - /* Find the main format node */ - text = fmt->text_node; - cur->node = text; - base_format = text->format_node; - EINA_INLIST_FOREACH(base_format, itr) - { - if (itr == fmt) - { - break; - } - position += itr->offset; - } - cur->pos = position; - -} - - -/** - * @internal - * Remove pairs of + and - formats and also remove formats without + or - - * i.e formats that pair to themselves. Only removes invisible formats - * that pair themselves, if you want to remove invisible formats that pair - * themselves, please first change fmt->visible to EINA_FALSE. - * - * @param o the textblock object. - * @param fmt the current format. - */ -static void -_evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o, - Evas_Object_Textblock_Node_Format *fmt) -{ - Evas_Object_Textblock_Node_Text *tnode; - Eina_List *formats = NULL; - size_t offset = 0; - - if (!fmt) return; - - tnode = fmt->text_node; - - do - { - Evas_Object_Textblock_Node_Format *nnode; - const char *fstr = fmt->orig_format; - - nnode = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); - if (nnode) - { - offset = nnode->offset; - } - - - if (fmt->opener && !fmt->own_closer) - { - formats = eina_list_prepend(formats, fmt); - } - else if (fstr && !fmt->opener) - { - Evas_Object_Textblock_Node_Format *fnode; - size_t fstr_len; - fstr_len = strlen(fstr); - /* Generic popper, just pop (if there's anything to pop). */ - if (formats && (((fstr[0] == ' ') && !fstr[1]) || !fstr[0])) - { - fnode = eina_list_data_get(formats); - formats = eina_list_remove_list(formats, formats); - _evas_textblock_node_format_remove(o, fnode, 0); - _evas_textblock_node_format_remove(o, fmt, 0); - } - /* Find the matching format and pop it, if the matching format - * is our format, i.e the last one, pop and break. */ - else - { - Eina_List *i, *next; - EINA_LIST_FOREACH_SAFE(formats, i, next, fnode) - { - if (_FORMAT_IS_CLOSER_OF( - fnode->orig_format, fstr, fstr_len)) - { - fnode = eina_list_data_get(i); - formats = eina_list_remove_list(formats, i); - _evas_textblock_node_format_remove(o, fnode, 0); - _evas_textblock_node_format_remove(o, fmt, 0); - break; - } - } - } - } - else if (!fmt->visible) - { - _evas_textblock_node_format_remove(o, fmt, 0); - } - fmt = nnode; - } - while (fmt && (offset == 0) && (fmt->text_node == tnode)); - eina_list_free(formats); -} -/** - * @internal - * Add the offset (may be negative) to the first node after fmt which is - * pointing to the text node tnode or to o->format_nodes if fmt is null - * and it points to tnode. - * - * @param o the textblock object. - * @param tnode the text node the format should point to. - * @param fmt the current format. - * @param offset the offest to add (may be negative). - */ -static void -_evas_textblock_node_format_adjust_offset(Evas_Object_Textblock *o, - Evas_Object_Textblock_Node_Text *tnode, - Evas_Object_Textblock_Node_Format *fmt, int offset) -{ - if (fmt) - { - fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next); - } - else - { - fmt = o->format_nodes; - } - if (fmt && (tnode == fmt->text_node)) - { - fmt->offset += offset; - } -} - -/** - * @internal - * Removes a format node updating the offset of the next format node and the - * text nodes pointing to this node. - * - * @param o the textblock object. - * @param n the fromat node to remove - */ -static void -_evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visible_adjustment) -{ - /* Update the text nodes about the change */ - { - Evas_Object_Textblock_Node_Format *nnode; - nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->next); - /* If there's a next node that belongs to the same text node - * and the curret node was the main one, advance the format node */ - if (nnode && (nnode->text_node == n->text_node)) - { - if (nnode->text_node->format_node == n) - { - nnode->text_node->format_node = nnode; - } - } - else - { - Evas_Object_Textblock_Node_Text *tnode; - /* If there's no next one update the text nodes */ - nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->prev); - tnode = n->text_node; - /* Even if it's not the current text_node's main node - * it can still be the next's. */ - if (tnode && (tnode->format_node != n)) - { - tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next); - } - while (tnode && (tnode->format_node == n)) - { - tnode->format_node = nnode; - tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next); - } - } - } - _evas_textblock_node_format_adjust_offset(o, n->text_node, n, - n->offset - visible_adjustment); - - o->format_nodes = _NODE_FORMAT(eina_inlist_remove( - EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n))); - _evas_textblock_node_format_free(o, n); -} - -/** - * @internal - * Sets all the offsets of the format nodes between start and end in the text - * node n to 0 and sets visibility to EINA_FALSE. - * If end == -1 end means the end of the string. - * Assumes there is a prev node or the current node will be preserved. - * - * @param n the text node the positinos refer to. - * @param start the start of where to delete from. - * @param end the end of the section to delete, if end == -1 it means the end of the string. - * @returns #EINA_TRUE if removed a PS, false otherwise. - */ -static Eina_Bool -_evas_textblock_node_text_adjust_offsets_to_start(Evas_Object_Textblock *o, - Evas_Object_Textblock_Node_Text *n, size_t start, int end) -{ - Evas_Object_Textblock_Node_Format *last_node, *itr; - Evas_Object_Textblock_Node_Text *new_node; - int use_end = 1; - int delta = 0; - int first = 1; - int update_format_node; - size_t pos = 0; - int orig_end; - - itr = n->format_node; - if (!itr || (itr->text_node != n)) return EINA_FALSE; - - orig_end = end; - if ((end < 0) || ((size_t) end == eina_ustrbuf_length_get(n->unicode))) - { - use_end = 0; - } - else if (end > 0) - { - /* We don't want the last one */ - end--; - } - - /* If we are not removing the text node, all should stay in this text - * node, otherwise, everything should move to the previous node */ - if ((start == 0) && !use_end) - { - new_node = _NODE_TEXT(EINA_INLIST_GET(n)->prev); - if (!new_node) - { - new_node = n; - } - } - else - { - new_node = n; - } - - /* Find the first node after start */ - while (itr && (itr->text_node == n)) - { - pos += itr->offset; - if (pos >= start) - { - break; - } - itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); - } - - if (!itr || (itr->text_node != n)) - { - return EINA_FALSE; - } - - update_format_node = ((itr == n->format_node) && (new_node != n)); - delta = orig_end - pos; - itr->offset -= pos - start; - - while (itr && (itr->text_node == n)) - { - last_node = itr; - itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); - - if (!first) - { - pos += last_node->offset; - } - - /* start is negative when this gets relevant */ - if (use_end && (pos > (size_t) end)) - { - last_node->offset -= delta; - break; - } - - delta = orig_end - pos; - if (!first) - { - last_node->offset = 0; - } - else - { - first = 0; - } - last_node->visible = EINA_FALSE; - - 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, last_node->format)) - { - _evas_textblock_node_format_remove(o, last_node, 0); - return EINA_TRUE; - } - - } - last_node->text_node = new_node; - if (update_format_node) - { - n->format_node = last_node; - } - } - - return EINA_FALSE; -} - -/** - * @internal - * Removes all the format nodes between start and end in the text node n. - * This function updates the offset of the next format node and the - * text nodes pointing to it. if end == -1 end means the end of the string. - * - * @param o the textblock object. - * @param n the text node the positinos refer to. - * @param start the start of where to delete from. - * @param end the end of the section to delete, if end == -1 it means the end of the string. - */ -static void -_evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o, - Evas_Object_Textblock_Node_Text *n, int start, int end) -{ - Evas_Object_Textblock_Node_Format *itr; - int use_end = 1; - int offset = end - start; - itr = n->format_node; - - if (itr) - start -= itr->offset; - if (offset < 0) offset = 0; - if (end < 0) use_end = 0; - while (itr && (itr->text_node == n)) - { - Evas_Object_Textblock_Node_Format *nnode; - int tmp_offset = 0; - - /* start is negative when this gets relevant */ - if ((offset + start < 0) && use_end) - { - break; - } - nnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); - if (nnode) - { - tmp_offset = nnode->offset; - } - if (start <= 0) - { - /* Don't do visible adjustments because we are removing the visual - * chars anyway and taking those into account */ - _evas_textblock_node_format_remove(o, itr, 0); - } - start -= tmp_offset; - itr = nnode; - } -} - -/** - * @internal - * Returns the first format in the range between start and end in the textblock - * n. - * - * @param o the textblock object. - * @param n the text node the positinos refer to. - * @param start the start of where to delete from. - * @param end the end of the section to delete, if end == -1 it means the end of the string. - */ -static Evas_Object_Textblock_Node_Format * -_evas_textblock_node_text_get_first_format_between( - Evas_Object_Textblock_Node_Text *n, int start, int end) -{ - Evas_Object_Textblock_Node_Format *itr; - int use_end = 1; - itr = n->format_node; - if (end < 0) use_end = 0; - while (itr && (itr->text_node == n)) - { - start -= itr->offset; - end -= itr->offset; - if ((end <= 0) && use_end) - { - break; - } - if (start <= 0) - { - return itr; - } - itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next); - } - return NULL; -} - -/** - * Removes a text node and the corresponding format nodes. - * - * @param o the textblock objec.t - * @param n the node to remove. - */ -static void -_evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n) -{ - _evas_textblock_node_text_adjust_offsets_to_start(o, n, 0, -1); - - o->text_nodes = _NODE_TEXT(eina_inlist_remove( - EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); - _evas_textblock_node_text_free(n); -} - -/** - * @internal - * Return the position where the formats starts at. - * - * @param fmt the format to return the position of. - * @return the position of the format in the text node it points to. - */ -static size_t -_evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt) -{ - Evas_Object_Textblock_Node_Text *text; - Evas_Object_Textblock_Node_Format *base_format; - Evas_Object_Textblock_Node_Format *itr; - size_t position = 0; - - if (!fmt) return 0; - /* Find the main format node */ - text = fmt->text_node; - base_format = text->format_node; - EINA_INLIST_FOREACH(base_format, itr) - { - if (itr == fmt) - { - break; - } - position += itr->offset; - } - return position + fmt->offset; -} - -EAPI int -evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n; - size_t npos = 0; - - if (!cur) return -1; - if (!cur->node) return 0; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - n = o->text_nodes; - while (n != cur->node) - { - npos += eina_ustrbuf_length_get(n->unicode); - n = _NODE_TEXT(EINA_INLIST_GET(n)->next); - } - return npos + cur->pos; -} - -EAPI void -evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n; - size_t pos; - - if (!cur) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - - if (_pos < 0) - { - pos = 0; - } - else - { - pos = (size_t) _pos; - } - - n = o->text_nodes; - while (n && (pos >= eina_ustrbuf_length_get(n->unicode))) - { - pos -= eina_ustrbuf_length_get(n->unicode); - n = _NODE_TEXT(EINA_INLIST_GET(n)->next); - } - - if (n) - { - cur->node = n; - cur->pos = pos; - } - else if (o->text_nodes) - { - /* In case we went pass the last node, we need to put the cursor - * at the absolute end. */ - Evas_Object_Textblock_Node_Text *last_n; - - last_n = _NODE_TEXT(EINA_INLIST_GET(o->text_nodes)->last); - pos = eina_ustrbuf_length_get(last_n->unicode); - - cur->node = last_n; - cur->pos = pos; - } - -} - -EAPI Eina_Bool -evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock_Item *it; - - if (!cur) return EINA_FALSE; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - - ln = _find_layout_line_num(cur->obj, line); - if (!ln) return EINA_FALSE; - it = (Evas_Object_Textblock_Item *)ln->items; - if (it) - { - cur->pos = it->text_pos; - cur->node = it->text_node; - } - else - { - cur->pos = 0; - - cur->node = o->text_nodes; - } - return EINA_TRUE; -} - -EAPI int -evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) -{ - Eina_Inlist *l1, *l2; - - if (!cur1) return 0; - if (!cur2) return 0; - if (cur1->obj != cur2->obj) return 0; - if ((!cur1->node) || (!cur2->node)) return 0; - if (cur1->node == cur2->node) - { - if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */ - else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */ - return 0; - } - for (l1 = EINA_INLIST_GET(cur1->node), - l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);) - { - if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */ - else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */ - else if (!l1) return -1; /* cur1 < cur 2 */ - else if (!l2) return 1; /* cur2 < cur 1 */ - l1 = l1->prev; - l2 = l2->next; - } - return 0; -} - -EAPI void -evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) -{ - if (!cur) return; - if (!cur_dest) return; - if (cur->obj != cur_dest->obj) return; - cur_dest->pos = cur->pos; - cur_dest->node = cur->node; - -} - - -/* text controls */ -/** - * @internal - * Free a text node. Shouldn't be used usually, it's better to use - * @ref _evas_textblock_node_text_remove for most cases . - * - * @param n the text node to free - * @see _evas_textblock_node_text_remove - */ -static void -_evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n) -{ - if (!n) return; - eina_ustrbuf_free(n->unicode); - if (n->utf8) - free(n->utf8); - if (n->par) - n->par->text_node = NULL; - free(n); -} - -/** - * @internal - * Create a new text node - * - * @return the new text node. - */ -static Evas_Object_Textblock_Node_Text * -_evas_textblock_node_text_new(void) -{ - Evas_Object_Textblock_Node_Text *n; - - n = calloc(1, sizeof(Evas_Object_Textblock_Node_Text)); - n->unicode = eina_ustrbuf_new(); - /* We want to layout each paragraph at least once. */ - n->dirty = EINA_TRUE; - n->is_new = EINA_TRUE; - - return n; -} - -/** - * @internal - * Break a paragraph. This does not add a PS but only splits the paragraph - * where a ps was just added! - * - * @param cur the cursor to break at. - * @param fnode the format node of the PS just added. - * @return Returns no value. - */ -static void -_evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur, - Evas_Object_Textblock_Node_Format *fnode) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n; - - if (!cur) return; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - - n = _evas_textblock_node_text_new(); - o->text_nodes = _NODE_TEXT(eina_inlist_append_relative( - EINA_INLIST_GET(o->text_nodes), - EINA_INLIST_GET(n), - EINA_INLIST_GET(cur->node))); - /* Handle text and format changes. */ - if (cur->node) - { - Evas_Object_Textblock_Node_Format *nnode; - size_t len, start; - const Eina_Unicode *text; - - /* If there was a format node in the delete range, - * make it our format and update the text_node fields, - * otherwise, use the paragraph separator - * of the previous paragraph. */ - nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - if (nnode && (nnode->text_node == cur->node)) - { - n->format_node = nnode; - nnode->offset--; /* We don't have to take the replacement char - into account anymore */ - while (nnode && (nnode->text_node == cur->node)) - { - nnode->text_node = n; - nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next); - } - } - else - { - n->format_node = fnode; - } - - /* cur->pos now points to the PS, move after. */ - start = cur->pos + 1; - len = eina_ustrbuf_length_get(cur->node->unicode) - start; - 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 - { - fnode = o->format_nodes; - if (fnode) - { - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->last); - } - n->format_node = fnode; - } -} - -/** - * @internal - * Set the node and offset of all the curs after cur. - * - * @param cur the cursor. - * @param n the current textblock node. - * @param new_node the new node to set. - */ -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) -{ - Eina_List *l; - Evas_Textblock_Cursor *data; - - if (n == o->cursor->node) - { - o->cursor->pos = 0; - o->cursor->node = new_node; - } - EINA_LIST_FOREACH(o->cursors, l, data) - { - if (n == data->node) - { - data->pos = 0; - data->node = new_node; - } - } -} - -/** - * @internal - * Update the offset of all the cursors after cur. - * - * @param cur the cursor. - * @param n the current textblock node. - * @param start the starting pos. - * @param offset how much to adjust (can be negative). - */ -static void -_evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, - const Evas_Object_Textblock_Node_Text *n, - size_t start, int offset) -{ - Eina_List *l; - Evas_Textblock_Cursor *data; - Evas_Object_Textblock *o; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - - if (cur != o->cursor) - { - if ((n == o->cursor->node) && - (o->cursor->pos > start)) - { - if ((offset < 0) && (o->cursor->pos <= (size_t) (-1 * offset))) - { - o->cursor->pos = 0; - } - else - { - o->cursor->pos += offset; - } - } - } - EINA_LIST_FOREACH(o->cursors, l, data) - { - if (data != cur) - { - if ((n == data->node) && - (data->pos > start)) - { - if ((offset < 0) && (data->pos <= (size_t) (-1 * offset))) - { - data->pos = 0; - } - else - { - data->pos += offset; - } - } - else if (!data->node) - { - data->node = o->text_nodes; - data->pos = 0; - } - } - } -} - -/** - * @internal - * Mark that the textblock has changed. - * - * @param o the textblock object. - * @param obj the evas object. - */ -static void -_evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj) -{ - o->formatted.valid = 0; - o->native.valid = 0; - o->content_changed = 1; - if (o->markup_text) - { - free(o->markup_text); - o->markup_text = NULL; - } - - evas_object_change(obj); -} - -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) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n; - Evas_Object_Textblock_Node_Format *fnode = NULL; - Eina_Unicode *text; - int len = 0; - - if (!cur) return 0; - text = eina_unicode_utf8_to_unicode(_text, &len); - o = (Evas_Object_Textblock *)(cur->obj->object_data); - - n = cur->node; - if (n) - { - Evas_Object_Textblock_Node_Format *nnode; - fnode = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); - fnode = _evas_textblock_node_format_last_at_off(fnode); - /* find the node after the current in the same paragraph - * either we find one and then take the next, or we try to get - * the first for the paragraph which must be after our position */ - if (fnode) - { - if (!evas_textblock_cursor_format_is_visible_get(cur)) - { - nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - if (nnode && (nnode->text_node == n)) - { - fnode = nnode; - } - else - { - fnode = NULL; - } - } - } - else - { - fnode = n->format_node; - } - } - else if (o->text_nodes) - { - n = cur->node = o->text_nodes; - cur->pos = 0; - } - else - { - n = _evas_textblock_node_text_new(); - o->text_nodes = _NODE_TEXT(eina_inlist_append( - EINA_INLIST_GET(o->text_nodes), - EINA_INLIST_GET(n))); - cur->node = n; - } - - eina_ustrbuf_insert_length(n->unicode, text, len, cur->pos); - /* Advance the formats */ - if (fnode && (fnode->text_node == cur->node)) - fnode->offset += len; - - /* Update all the cursors after our position. */ - _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, len); - - _evas_textblock_changed(o, cur->obj); - n->dirty = EINA_TRUE; - free(text); - - if (!o->cursor->node) - o->cursor->node = o->text_nodes; - return len; -} - -EAPI int -evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text) -{ - int len; - /*append is essentially prepend without advancing */ - len = evas_textblock_cursor_text_append(cur, _text); - cur->pos += len; /*Advance */ - return len; -} - -/** - * @internal - * Free a format node - * - * @param o the textblock object - * @param n the format node to free - */ -static void -_evas_textblock_node_format_free(Evas_Object_Textblock *o, - Evas_Object_Textblock_Node_Format *n) -{ - if (!n) return; - eina_stringshare_del(n->format); - eina_stringshare_del(n->orig_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); -} - -/** - * @internal - * 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(Evas_Object_Textblock *o, const char *_format) -{ - Evas_Object_Textblock_Node_Format *n; - const char *format = _format; - const char *pre_stripped_format = NULL; - - n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format)); - /* Create orig_format and format */ - if (format[0] == '<') - { - const char *match; - size_t format_len; - size_t replace_len; - - format++; /* Advance after '<' */ - format_len = strlen(format); - if ((format_len > 0) && format[format_len - 1] == '>') - { - format_len--; /* We don't care about '>' */ - /* Check if it closes itself. Skip the case. */ - if ((format_len > 1) && format[format_len - 1] == '/') - { - format_len--; /* We don't care about '/' */ - n->own_closer = EINA_TRUE; - } - } - - if (!o->style_user || !(match = _style_match_tag(o->style_user, format, - format_len, &replace_len))) - { - match = _style_match_tag(o->style, format, format_len, - &replace_len); - } - - if (match) - { - if (match[0] != '-') - { - n->opener = EINA_TRUE; - if (match[0] != '+') - { - n->own_closer = EINA_TRUE; - } - } - - pre_stripped_format = match; - } - else - { - if (format[0] == '/') - { - format++; - format_len--; - } - else - { - n->opener = EINA_TRUE; - } - } - - n->orig_format = eina_stringshare_add_length(format, format_len); - - if (!pre_stripped_format) - pre_stripped_format = n->orig_format; - } - /* Just use as is, it's a special format. */ - else - { - const char *tmp = format; - if (format[0] != '-') - { - n->opener = EINA_TRUE; - if (format[0] != '+') - { - n->own_closer = EINA_TRUE; - } - } - if ((*tmp == '+') || (*tmp == '-')) - { - tmp++; - while (*tmp == ' ') tmp++; - } - n->orig_format = eina_stringshare_add(tmp); - pre_stripped_format = n->orig_format; - } - - /* Strip format */ - { - const char *tmp = pre_stripped_format; - if ((*tmp == '+') || (*tmp == '-')) - { - tmp++; - while (*tmp == ' ') tmp++; - } - n->format = eina_stringshare_add(tmp); - } - format = n->format; - - _evas_textblock_format_is_visible(n, format); - 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->is_new = EINA_TRUE; - - return n; -} - -static Eina_Bool -_evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur) -{ - const Eina_Unicode *text; - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - text = eina_ustrbuf_string_get(cur->node->unicode); - return ((text[cur->pos] == 0) && (!EINA_INLIST_GET(cur->node)->next)) ? - EINA_TRUE : EINA_FALSE; -} - -EAPI Eina_Bool -evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Format *n; - Eina_Bool is_visible; - - if (!cur) return EINA_FALSE; - if ((!format) || (format[0] == 0)) return EINA_FALSE; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - /* We should always have at least one text node */ - if (!o->text_nodes) - { - evas_textblock_cursor_text_prepend(cur, ""); - } - - n = _evas_textblock_node_format_new(o, format); - is_visible = n->visible; - format = n->format; - if (!cur->node) - { - o->format_nodes = _NODE_FORMAT(eina_inlist_append( - EINA_INLIST_GET(o->format_nodes), - EINA_INLIST_GET(n))); - cur->pos = 0; - n->text_node = (EINA_INLIST_GET(n)->prev) ? - _NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node : - o->text_nodes; - cur->node = n->text_node; - } - else - { - Evas_Object_Textblock_Node_Format *fmt; - fmt = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur); - n->text_node = cur->node; - if (!fmt) - { - o->format_nodes = _NODE_FORMAT(eina_inlist_prepend( - EINA_INLIST_GET(o->format_nodes), - EINA_INLIST_GET(n))); - n->offset = cur->pos; - } - else - { - if (evas_textblock_cursor_format_is_visible_get(cur)) - { - o->format_nodes = _NODE_FORMAT(eina_inlist_prepend_relative( - EINA_INLIST_GET(o->format_nodes), - EINA_INLIST_GET(n), - EINA_INLIST_GET(fmt) - )); - n->offset = fmt->offset; - if (fmt->text_node->format_node == fmt) - { - fmt->text_node->format_node = n; - } - } - else - { - fmt = _evas_textblock_node_format_last_at_off(fmt); - o->format_nodes = _NODE_FORMAT(eina_inlist_append_relative( - EINA_INLIST_GET(o->format_nodes), - EINA_INLIST_GET(n), - EINA_INLIST_GET(fmt) - )); - if (fmt->text_node != cur->node) - { - n->offset = cur->pos; - } - else - { - n->offset = cur->pos - - _evas_textblock_node_format_pos_get(fmt); - } - } - } - /* Adjust differently if we insert a format char */ - if (is_visible) - { - _evas_textblock_node_format_adjust_offset(o, cur->node, n, - -(n->offset - 1)); - } - else - { - _evas_textblock_node_format_adjust_offset(o, cur->node, n, - -n->offset); - } - - if (!fmt || (fmt->text_node != cur->node)) - { - cur->node->format_node = n; - } - } - if (is_visible && cur->node) - { - 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 = _NEWLINE; - else if (_IS_TAB(format)) - insert_char = _TAB; - else - insert_char = _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); - if (_IS_PARAGRAPH_SEPARATOR(o, format)) - { - _evas_textblock_cursor_break_paragraph(cur, n); - } - else - { - /* Handle visible format nodes here */ - cur->node->dirty = EINA_TRUE; - n->is_new = EINA_FALSE; - } - } - else - { - o->format_changed = EINA_TRUE; - } - - _evas_textblock_changed(o, cur->obj); - - if (!o->cursor->node) - o->cursor->node = o->text_nodes; - return is_visible; -} - -EAPI Eina_Bool -evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) -{ - Eina_Bool is_visible; - /* append is essentially prepend without advancing */ - is_visible = evas_textblock_cursor_format_append(cur, format); - if (is_visible) - { - /* Advance after the replacement char */ - evas_textblock_cursor_char_next(cur); - } - - return is_visible; -} - - -EAPI void -evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n, *n2; - const Eina_Unicode *text; - 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); - ind = cur->pos; - if (text[ind]) - chr = text[ind++]; - else - chr = 0; - - if (chr == 0) return; - ppos = cur->pos; - eina_ustrbuf_remove(n->unicode, cur->pos, ind); - /* Remove a format node if needed, and remove the char only if the - * fmt node is not visible */ - { - Eina_Bool should_merge = EINA_FALSE; - Evas_Object_Textblock_Node_Format *fmt, *fmt2; - fmt = _evas_textblock_cursor_node_format_at_pos_get(cur); - if (fmt) - { - const char *format = NULL; - 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 = last_fmt->format; - if (format && _IS_PARAGRAPH_SEPARATOR(o, format)) - { - /* If it was a paragraph separator, we should merge the - * current with the next, there must be a next. */ - should_merge = EINA_TRUE; - } - /* If a singnular, mark as invisible, so we'll delete it. */ - if (!format || last_fmt->own_closer) - { - last_fmt->visible = EINA_FALSE; - } - } - - 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, - -(ind - cur->pos)); - - if (should_merge) - { - _evas_textblock_cursor_nodes_merge(cur); - } - - _evas_textblock_node_format_remove_matching(o, fmt); - } - - if (cur->pos == eina_ustrbuf_length_get(n->unicode)) - { - n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next); - if (n2) - { - cur->node = n2; - cur->pos = 0; - } - } - - _evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos)); - _evas_textblock_changed(o, cur->obj); - cur->node->dirty = EINA_TRUE; -} - -EAPI void -evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) -{ - Evas_Object_Textblock_Node_Format *fnode = NULL; - Evas_Object_Textblock *o; - Evas_Object_Textblock_Node_Text *n1, *n2; - Eina_Bool should_merge = EINA_FALSE, reset_cursor = EINA_FALSE; - - if (!cur1 || !cur1->node) return; - if (!cur2 || !cur2->node) return; - if (cur1->obj != cur2->obj) return; - o = (Evas_Object_Textblock *)(cur1->obj->object_data); - if (evas_textblock_cursor_compare(cur1, cur2) > 0) - { - Evas_Textblock_Cursor *tc; - - tc = cur1; - cur1 = cur2; - cur2 = tc; - } - n1 = cur1->node; - n2 = cur2->node; - if ((evas_textblock_cursor_compare(o->cursor, cur1) >= 0) && - (evas_textblock_cursor_compare(cur2, o->cursor) >= 0)) - { - reset_cursor = EINA_TRUE; - } - - - if (n1 == n2) - { - if ((cur1->pos == 0) && - (cur2->pos == eina_ustrbuf_length_get(n1->unicode))) - { - _evas_textblock_node_text_remove_formats_between(o, n1, 0, -1); - } - else - { - should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o, - n1, cur1->pos, cur2->pos); - } - eina_ustrbuf_remove(n1->unicode, cur1->pos, cur2->pos); - _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos, - (cur2->pos - cur1->pos)); - } - 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); - /* Remove all the text nodes between */ - while (n && (n != n2)) - { - Evas_Object_Textblock_Node_Text *nnode; - - nnode = _NODE_TEXT(EINA_INLIST_GET(n)->next); - _evas_textblock_cursors_set_node(o, n, n1); - _evas_textblock_node_text_remove(o, n); - n = nnode; - } - should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o, n2, - 0, cur2->pos); - - /* Remove the formats and the strings in the first and last nodes */ - len = eina_ustrbuf_length_get(n1->unicode); - eina_ustrbuf_remove(n1->unicode, cur1->pos, len); - eina_ustrbuf_remove(n2->unicode, 0, cur2->pos); - /* Merge the nodes because we removed the PS */ - _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos, - - cur1->pos); - _evas_textblock_cursors_update_offset(cur2, cur2->node, 0, - cur2->pos); - _evas_textblock_nodes_merge(o, n1); - } - fnode = _evas_textblock_cursor_node_format_at_pos_get(cur1); - - n1->dirty = n2->dirty = EINA_TRUE; - if (should_merge) - { - /* We call this function instead of the cursor one because we already - * updated the cursors */ - _evas_textblock_nodes_merge(o, n1); - } - _evas_textblock_node_format_remove_matching(o, fnode); - - evas_textblock_cursor_copy(cur1, cur2); - if (reset_cursor) - evas_textblock_cursor_copy(cur1, o->cursor); - - _evas_textblock_changed(o, cur1->obj); -} - - -EAPI char * -evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) -{ - if (!cur || !cur->node) return NULL; - if (evas_textblock_cursor_format_is_visible_get(cur)) - { - Eina_Strbuf *buf; - Evas_Object_Textblock_Node_Format *fnode; - char *ret; - fnode = _evas_textblock_node_visible_at_pos_get( - evas_textblock_cursor_format_get(cur)); - - buf = eina_strbuf_new(); - _markup_get_format_append(buf, fnode); - ret = eina_strbuf_string_steal(buf); - eina_strbuf_free(buf); - - return ret; - } - else - { - const Eina_Unicode *ustr; - Eina_Unicode buf[2]; - char *s; - - ustr = eina_ustrbuf_string_get(cur->node->unicode); - buf[0] = ustr[cur->pos]; - buf[1] = 0; - s = eina_unicode_unicode_to_utf8(buf, NULL); - - return s; - } -} - -static char * -_evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) -{ - Evas_Object_Textblock_Node_Text *tnode; - Eina_Strbuf *buf; - Evas_Textblock_Cursor *cur2; - buf = eina_strbuf_new(); - - if (!cur1 || !cur1->node) return NULL; - if (!_cur2 || !_cur2->node) return NULL; - if (cur1->obj != _cur2->obj) return NULL; - if (evas_textblock_cursor_compare(cur1, _cur2) > 0) - { - const Evas_Textblock_Cursor *tc; - - tc = cur1; - cur1 = _cur2; - _cur2 = tc; - } - /* Work on a local copy of the cur */ - cur2 = alloca(sizeof(Evas_Textblock_Cursor)); - cur2->obj = _cur2->obj; - evas_textblock_cursor_copy(_cur2, cur2); - - /* Parse the text between the cursors. */ - for (tnode = cur1->node ; tnode ; - tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next)) - { - Evas_Object_Textblock_Node_Format *fnode; - Eina_Unicode *text_base, *text; - int off = 0; - - text_base = text = - eina_unicode_strndup(eina_ustrbuf_string_get(tnode->unicode), - eina_ustrbuf_length_get(tnode->unicode)); - if (tnode == cur2->node) - { - fnode = _evas_textblock_node_text_get_first_format_between(tnode, - cur1->pos, cur2->pos); - } - else if (tnode == cur1->node) - { - fnode = _evas_textblock_node_text_get_first_format_between(tnode, - cur1->pos, -1); - } - else - { - fnode = _evas_textblock_node_text_get_first_format_between(tnode, - 0, -1); - } - /* Init the offset so the first one will count starting from cur1->pos - * and not the previous format node */ - if (tnode == cur1->node) - { - if (fnode) - { - off = _evas_textblock_node_format_pos_get(fnode) - - cur1->pos - fnode->offset; - } - text += cur1->pos; - } - else - { - off = 0; - } - while (fnode && (fnode->text_node == tnode)) - { - Eina_Unicode tmp_ch; - off += fnode->offset; - if ((tnode == cur2->node) && - ((size_t) (text - text_base + off) >= cur2->pos)) - { - break; - } - /* No need to skip on the first run */ - tmp_ch = text[off]; - text[off] = 0; /* Null terminate the part of the string */ - _markup_get_text_append(buf, text); - _markup_get_format_append(buf, fnode); - text[off] = tmp_ch; /* Restore the char */ - text += off; - if (fnode->visible) - { - off = -1; - text++; - } - else - { - off = 0; - } - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - } - /* If we got to the last node, stop and add the rest outside */ - if (cur2->node == tnode) - { - /* Add the rest, skip replacement */ - /* Don't go past the second cursor pos */ - text_base[cur2->pos] = '\0'; - _markup_get_text_append(buf, text); - free(text_base); - break; - } - else - { - /* Add the rest, skip replacement */ - _markup_get_text_append(buf, text); - free(text_base); - } - } - /* return the string */ - { - char *ret; - ret = eina_strbuf_string_steal(buf); - eina_strbuf_free(buf); - return ret; - } -} - -static char * -_evas_textblock_cursor_range_text_plain_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) -{ - Eina_UStrbuf *buf; - Evas_Object_Textblock_Node_Text *n1, *n2; - Evas_Textblock_Cursor *cur2; - - buf = eina_ustrbuf_new(); - - if (!cur1 || !cur1->node) return NULL; - if (!_cur2 || !_cur2->node) return NULL; - if (cur1->obj != _cur2->obj) return NULL; - if (evas_textblock_cursor_compare(cur1, _cur2) > 0) - { - const Evas_Textblock_Cursor *tc; - - tc = cur1; - cur1 = _cur2; - _cur2 = tc; - } - n1 = cur1->node; - n2 = _cur2->node; - /* Work on a local copy of the cur */ - cur2 = alloca(sizeof(Evas_Textblock_Cursor)); - cur2->obj = _cur2->obj; - evas_textblock_cursor_copy(_cur2, cur2); - - - if (n1 == n2) - { - const Eina_Unicode *tmp; - tmp = eina_ustrbuf_string_get(n1->unicode); - eina_ustrbuf_append_length(buf, tmp + cur1->pos, cur2->pos - cur1->pos); - } - else - { - const Eina_Unicode *tmp; - tmp = eina_ustrbuf_string_get(n1->unicode); - eina_ustrbuf_append(buf, tmp + cur1->pos); - n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next); - while (n1 != n2) - { - tmp = eina_ustrbuf_string_get(n1->unicode); - eina_ustrbuf_append_length(buf, tmp, - eina_ustrbuf_length_get(n1->unicode)); - n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next); - } - tmp = eina_ustrbuf_string_get(n2->unicode); - eina_ustrbuf_append_length(buf, tmp, cur2->pos); - } - - /* Free and return */ - { - char *ret; - ret = eina_unicode_unicode_to_utf8(eina_ustrbuf_string_get(buf), NULL); - eina_ustrbuf_free(buf); - return ret; - } -} - -EAPI Eina_List * -evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) -{ - Evas_Object *obj = cur1->obj; - Eina_List *ret = NULL; - Evas_Object_Textblock_Node_Text *n1, *n2; - Evas_Object_Textblock_Node_Format *first, *last; - TB_HEAD_RETURN(NULL); - if (!cur1 || !cur1->node) return NULL; - if (!cur2 || !cur2->node) return NULL; - if (cur1->obj != cur2->obj) return NULL; - if (evas_textblock_cursor_compare(cur1, cur2) > 0) - { - const Evas_Textblock_Cursor *tc; - - tc = cur1; - cur1 = cur2; - cur2 = tc; - } - n1 = cur1->node; - n2 = cur2->node; - - /* FIXME: Change first and last getting to format_before_or_at_pos_get */ - - last = n2->format_node; - - /* If n2->format_node is NULL, we don't have formats in the tb/range. */ - if (!last) - return NULL; - /* If the found format is on our text node, we should go to the last - * one, otherwise, the one we found is good enough. */ - if (last->text_node == n2) - { - Evas_Object_Textblock_Node_Format *fnode = last; - while (fnode && (fnode->text_node == n2)) - { - last = fnode; - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - } - } - - /* If the first format node is within the range (i.e points to n1) or if - * we have other formats in the range, go through them */ - first = n1->format_node; - if ((first->text_node == n1) || (first != last)) - { - Evas_Object_Textblock_Node_Format *fnode = first; - /* Go to the first one in the range */ - if (first->text_node != n1) - { - first = _NODE_FORMAT(EINA_INLIST_GET(first)->next); - } - - while (fnode) - { - ret = eina_list_append(ret, fnode); - if (fnode == last) - break; - fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next); - } - } - - return ret; - -} - -EAPI char * -evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) -{ - if (format == EVAS_TEXTBLOCK_TEXT_MARKUP) - return _evas_textblock_cursor_range_text_markup_get(cur1, cur2); - else if (format == EVAS_TEXTBLOCK_TEXT_PLAIN) - return _evas_textblock_cursor_range_text_plain_get(cur1, cur2); - else - return NULL; /* Not yet supported */ -} - -EAPI const char * -evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) -{ - Evas_Textblock_Cursor cur1, cur2; - if (!cur) return NULL; - if (!cur->node) return NULL; - if (cur->node->utf8) - { - free(cur->node->utf8); - } - cur1.obj = cur2.obj = cur->obj; - cur1.node = cur2.node = cur->node; - evas_textblock_cursor_paragraph_char_first(&cur1); - evas_textblock_cursor_paragraph_char_last(&cur2); - - cur->node->utf8 = evas_textblock_cursor_range_text_get(&cur1, &cur2, - EVAS_TEXTBLOCK_TEXT_MARKUP); - return cur->node->utf8; -} - -EAPI int -evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) -{ - int len; - if (!cur) return -1; - if (!cur->node) return -1; - len = eina_ustrbuf_length_get(cur->node->unicode); - - if (EINA_INLIST_GET(cur->node)->next) - return len - 1; /* Remove the paragraph separator */ - else - return len; -} - -EAPI const Evas_Object_Textblock_Node_Format * -evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) -{ - if (!cur) return NULL; - if (!cur->node) return NULL; - return _evas_textblock_cursor_node_format_at_pos_get(cur); -} - -EAPI const char * -evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt) -{ - static char *ret = NULL; - char *tmp; - - if (!fmt) return NULL; - - if (ret) free(ret); - ret = malloc(strlen(fmt->orig_format) + 2 + 1); - tmp = ret; - - if (fmt->opener && !fmt->own_closer) - { - *(tmp++) = '+'; - *(tmp++) = ' '; - } - else if (!fmt->opener) - { - *(tmp++) = '-'; - *(tmp++) = ' '; - } - strcpy(tmp, fmt->orig_format); - return ret; -} - -EAPI void -evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) -{ - if (!fmt || !cur) return; - cur->node = fmt->text_node; - cur->pos = _evas_textblock_node_format_pos_get(fmt); -} - -EAPI Eina_Bool -evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) -{ - const Eina_Unicode *text; - - if (!cur) return EINA_FALSE; - if (!cur->node) return EINA_FALSE; - if (!evas_textblock_cursor_is_format(cur)) return EINA_FALSE; - text = eina_ustrbuf_string_get(cur->node->unicode); - return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]); -} - -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) - { - ret = evas_textblock_cursor_pen_geometry_get(cur, cx, cy, cw, ch); - } - else if (ctype == EVAS_TEXTBLOCK_CURSOR_BEFORE) - { - /* In the case of a "before cursor", we should get the coordinates - * of just after the previous char (which in bidi text may not be - * just before the current char). */ - Evas_Coord x, y, h, w; - Evas_Object_Textblock_Node_Format *fmt; - - /* If it's at the end of the line, we want to get the position, not - * the position of the previous */ - if ((cur->pos > 0) && !_evas_textblock_cursor_is_at_the_end(cur)) - { -#ifdef BIDI_SUPPORT - Eina_Bool before_char = EINA_FALSE; -#endif - cur2.obj = cur->obj; - evas_textblock_cursor_copy(cur, &cur2); - evas_textblock_cursor_char_prev(&cur2); - - fmt = _evas_textblock_cursor_node_format_at_pos_get(&cur2); - - if (!fmt || !_IS_LINE_SEPARATOR(fmt->format)) - { - dir_cur = &cur2; -#ifdef BIDI_SUPPORT - before_char = EINA_FALSE; -#endif - } -#ifdef BIDI_SUPPORT - else - { - before_char = EINA_TRUE; - } -#endif - ret = evas_textblock_cursor_pen_geometry_get( - dir_cur, &x, &y, &w, &h); -#ifdef BIDI_SUPPORT - /* Adjust if the char is an rtl char */ - if (ret >= 0) - { - 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; - } - } -#endif - } - else if (cur->pos == 0) - { - 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 && 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) && (!is_rtl)) - { - /* Just don't advance the width */ - w = 0; - } -#endif - } - else - { - ret = evas_textblock_cursor_pen_geometry_get( - dir_cur, &x, &y, &w, &h); - } - if (ret >= 0) - { - if (cx) *cx = x + w; - if (cy) *cy = y; - if (cw) *cw = 0; - if (ch) *ch = h; - } - } - - 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 = (is_rtl) ? - EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; - } - else if (dir_cur->pos > 0) - { - *dir = (is_rtl) ? - EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; - } - else -#endif - { - *dir = EVAS_BIDI_DIRECTION_LTR; - } - } - return ret; -} - -/** - * @internal - * Returns the geometry/pen position (depending on query_func) of the char - * at pos. - * - * @param cur the position of the char. - * @param query_func the query function to use. - * @param cx the x of the char (or pen_x in the case of pen position). - * @param cy the y of the char. - * @param cw the w of the char (or advance in the case pen position). - * @param ch the h of the char. - * @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, 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; - Evas_Object_Textblock_Item *it = NULL; - Evas_Object_Textblock_Text_Item *ti = NULL; - Evas_Object_Textblock_Format_Item *fi = NULL; - int x = 0, y = 0, w = 0, h = 0; - int pos; - Eina_Bool previous_format; - - 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) - { - if (!o->paragraphs) return -1; - ln = o->paragraphs->lines; - if (!ln) return -1; - if (cx) *cx = ln->x; - if (cy) *cy = ln->par->y + ln->y; - if (cw) *cw = ln->w; - if (ch) *ch = ln->h; - return ln->par->line_no + ln->line_no; - } - else - return -1; - } - - previous_format = _find_layout_item_match(cur, &ln, &it); - if (!it) - { - return -1; - } - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - ti = _ITEM_TEXT(it); - } - else - { - fi = _ITEM_FORMAT(it); - } - - if (ln && ti) - { - pos = cur->pos - ti->parent.text_pos; - - if (pos < 0) pos = 0; - if (ti->parent.format->font.font) - { - query_func(cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - pos, - &x, &y, &w, &h); - } - - x += ln->x + _ITEM(ti)->x; - - if (x < ln->x) - { - x = ln->x; - } - y = ln->par->y + ln->y; - h = ln->h; - } - else if (ln && fi) - { - if (previous_format) - { - if (_IS_LINE_SEPARATOR(fi->item)) - { - x = 0; - y = ln->par->y + ln->y + ln->h; - } - else - { -#ifdef BIDI_SUPPORT - if (ln->par->direction == EVAS_BIDI_DIRECTION_RTL) - { - x = ln->x; - } - else -#endif - { - x = ln->x + ln->w; - } - y = ln->par->y + ln->y; - } - w = 0; - h = ln->h; - } - else - { - x = ln->x + _ITEM(fi)->x; - y = ln->par->y + ln->y; - w = _ITEM(fi)->w; - h = ln->h; - } - } - else - { - return -1; - } - if (cx) *cx = x; - if (cy) *cy = y; - if (cw) *cw = w; - if (ch) *ch = h; - return ln->par->line_no + ln->line_no; -} - -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) -{ - return _evas_textblock_cursor_char_pen_geometry_common_get( - cur->ENFN->font_char_coords_get, cur, cx, cy, cw, ch); -} - -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) -{ - return _evas_textblock_cursor_char_pen_geometry_common_get( - cur->ENFN->font_pen_coords_get, cur, cx, cy, cw, ch); -} - -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) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln = NULL; - Evas_Object_Textblock_Item *it = NULL; - int x, y, w, h; - - if (!cur) return -1; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - if (!cur->node) - { - ln = o->paragraphs->lines; - } - else - { - _find_layout_item_match(cur, &ln, &it); - } - if (!ln) return -1; - x = ln->x; - y = ln->par->y + ln->y; - w = ln->w; - h = ln->h; - if (cx) *cx = x; - if (cy) *cy = y; - if (cw) *cw = w; - if (ch) *ch = h; - return ln->par->line_no + ln->line_no; -} - -EAPI Eina_Bool -evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) -{ - Evas *e; - Evas_Coord cy, ch; - Evas_Object *obj = start->obj; - TB_HEAD_RETURN(EINA_FALSE); - e = evas_object_evas_get(obj); - cy = 0 - obj->cur.geometry.y; - ch = e->viewport.h; - evas_textblock_cursor_line_coord_set(start, cy); - evas_textblock_cursor_line_coord_set(end, cy + ch); - evas_textblock_cursor_line_char_last(end); - - return EINA_TRUE; -} - -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 *found_par; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock_Item *it = NULL; - - if (!cur) return EINA_FALSE; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - x += o->style_pad.l; - y += o->style_pad.t; - - 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; - if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y)) - { - /* If before or after the line, go to start/end according - * to paragraph direction. */ - if (x < ln->x) - { - cur->pos = ln->items->text_pos; - cur->node = found_par->text_node; - if (found_par->direction == EVAS_BIDI_DIRECTION_RTL) - { - evas_textblock_cursor_line_char_last(cur); - } - else - { - evas_textblock_cursor_line_char_first(cur); - } - return EINA_TRUE; - } - else if (x >= ln->x + ln->w) - { - cur->pos = ln->items->text_pos; - cur->node = found_par->text_node; - if (found_par->direction == EVAS_BIDI_DIRECTION_RTL) - { - evas_textblock_cursor_line_char_first(cur); - } - else - { - evas_textblock_cursor_line_char_last(cur); - } - return EINA_TRUE; - } - - EINA_INLIST_FOREACH(ln->items, it) - { - if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x)) - { - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - int pos; - int cx, cy, cw, ch; - Evas_Object_Textblock_Text_Item *ti; - ti = _ITEM_TEXT(it); - - pos = -1; - if (ti->parent.format->font.font) - pos = cur->ENFN->font_char_at_coords_get( - cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - x - it->x - ln->x, 0, - &cx, &cy, &cw, &ch); - if (pos < 0) - return EINA_FALSE; - cur->pos = pos + it->text_pos; - cur->node = it->text_node; - return EINA_TRUE; - } - else - { - Evas_Object_Textblock_Format_Item *fi; - fi = _ITEM_FORMAT(it); - cur->pos = fi->parent.text_pos; - cur->node = found_par->text_node; - return EINA_TRUE; - } - } - } - } - } - } - else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h)) - { - /* If we are after the last paragraph, use the last position in the - * text. */ - evas_textblock_cursor_paragraph_last(cur); - return EINA_TRUE; - } - else if (o->paragraphs && (y < o->paragraphs->y)) - { - evas_textblock_cursor_paragraph_first(cur); - return EINA_TRUE; - } - - return EINA_FALSE; -} - -EAPI int -evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Paragraph *found_par; - Evas_Object_Textblock_Line *ln; - - if (!cur) return -1; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - y += o->style_pad.t; - - 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; - if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y)) - { - evas_textblock_cursor_line_set(cur, ln->par->line_no + - ln->line_no); - return ln->par->line_no + ln->line_no; - } - } - } - else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h)) - { - int line_no = 0; - /* If we are after the last paragraph, use the last position in the - * text. */ - evas_textblock_cursor_paragraph_last(cur); - if (cur->node && cur->node->par) - { - line_no = cur->node->par->line_no; - if (cur->node->par->lines) - { - line_no += ((Evas_Object_Textblock_Line *) - EINA_INLIST_GET(cur->node->par->lines)->last)->line_no; - } - } - return line_no; - } - else if (o->paragraphs && (y < o->paragraphs->y)) - { - int line_no = 0; - evas_textblock_cursor_paragraph_first(cur); - if (cur->node && cur->node->par) - { - line_no = cur->node->par->line_no; - } - return line_no; - } - return -1; -} - -/** - * @internal - * Updates x and w according to the text direction, position in text and - * if it's a special case switch - * - * @param ti the text item we are working on - * @param x the current x (we get) and the x we return - * @param w the current w (we get) and the w we return - * @param start if this is the first item or not - * @param switch_items toogles item switching (rtl cases) - */ -static void -_evas_textblock_range_calc_x_w(const Evas_Object_Textblock_Item *it, - Evas_Coord *x, Evas_Coord *w, Eina_Bool start, Eina_Bool switch_items) -{ - if ((start && !switch_items) || (!start && switch_items)) - { -#ifdef BIDI_SUPPORT - if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && - _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) - || - ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && - _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL)) - { - *w = *x + *w; - *x = 0; - } - else -#endif - { - *w = it->adv - *x; - } - } - else - { -#ifdef BIDI_SUPPORT - if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) && - _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) - || - ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) && - _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL)) - { - *x = *x + *w; - *w = it->adv - *x; - } - else -#endif - { - *w = *x; - *x = 0; - } - } - -} - -/** - * @internal - * Returns the geometry of the range in line ln. Cur1 is the start cursor, - * cur2 is the end cursor, NULL means from the start or to the end accordingly. - * Assumes that ln is valid, and that at least one of cur1 and cur2 is not NULL. - * - * @param ln the line to work on. - * @param cur1 the start cursor - * @param cur2 the end cursor - * @return Returns the geometry of the range - */ -static Eina_List * -_evas_textblock_cursor_range_in_line_geometry_get( - const Evas_Object_Textblock_Line *ln, const Evas_Textblock_Cursor *cur1, - const Evas_Textblock_Cursor *cur2) -{ - Evas_Object_Textblock_Item *it; - Evas_Object_Textblock_Item *it1, *it2; - Eina_List *rects = NULL; - Evas_Textblock_Rectangle *tr; - size_t start, end; - Eina_Bool switch_items; - const Evas_Textblock_Cursor *cur; - - cur = (cur1) ? cur1 : cur2; - - if (!cur) return NULL; - - /* Find the first and last items */ - it1 = it2 = NULL; - start = end = 0; - EINA_INLIST_FOREACH(ln->items, it) - { - size_t item_len; - item_len = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? - _ITEM_TEXT(it)->text_props.text_len - : 1; - if ((!cur1 || (cur1->pos < it->text_pos + item_len)) && - (!cur2 || (cur2->pos >= it->text_pos))) - { - if (!it1) - { - it1 = it; - start = item_len; /* start stores the first item_len */ - } - it2 = it; - end = item_len; /* end stores the last item_len */ - } - } - - /* If we couldn't find even one item, return */ - if (!it1) return NULL; - - /* If the first item is logically before or equal the second item - * we have to set start and end differently than in the other case */ - if (it1->text_pos <= it2->text_pos) - { - start = (cur1) ? (cur1->pos - it1->text_pos) : 0; - end = (cur2) ? (cur2->pos - it2->text_pos) : end; - switch_items = EINA_FALSE; - } - else - { - start = (cur2) ? (cur2->pos - it1->text_pos) : start; - end = (cur1) ? (cur1->pos - it2->text_pos) : 0; - switch_items = EINA_TRUE; - } - - /* IMPORTANT: Don't use cur1/cur2 past this point (because they probably - * don't make sense anymore. That's why there are start and end), - * unless you know what you are doing */ - - /* Special case when they share the same item and it's a text item */ - if ((it1 == it2) && (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT)) - { - Evas_Coord x1, w1, x2, w2; - Evas_Coord x, w, y, h; - Evas_Object_Textblock_Text_Item *ti; - int ret = 0; - - ti = _ITEM_TEXT(it1); - if (ti->parent.format->font.font) - { - ret = cur->ENFN->font_pen_coords_get(cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - start, - &x1, &y, &w1, &h); - } - if (!ret) - { - return NULL; - } - ret = cur->ENFN->font_pen_coords_get(cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - end, - &x2, &y, &w2, &h); - if (!ret) - { - return NULL; - } - - /* Make x2 the one on the right */ - if (x2 < x1) - { - Evas_Coord tmp; - tmp = x1; - x1 = x2; - x2 = tmp; - - tmp = w1; - w1 = w2; - w2 = tmp; - } - -#ifdef BIDI_SUPPORT - if (ti->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - x = x1 + w1; - w = x2 + w2 - x; - } - else -#endif - { - x = x1; - w = x2 - x1; - } - if (w > 0) - { - tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); - rects = eina_list_append(rects, tr); - tr->x = ln->x + it1->x + x; - tr->y = ln->par->y + ln->y; - tr->h = ln->h; - tr->w = w; - } - } - else if (it1 != it2) - { - /* Get the middle items */ - Evas_Coord min_x, max_x; - Evas_Coord x, w; - it = _ITEM(EINA_INLIST_GET(it1)->next); - min_x = max_x = it->x; - - if (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Coord y, h; - Evas_Object_Textblock_Text_Item *ti; - int ret; - ti = _ITEM_TEXT(it1); - - ret = cur->ENFN->font_pen_coords_get(cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - start, - &x, &y, &w, &h); - if (!ret) - { - /* BUG! Skip the first item */ - x = w = 0; - } - else - { - _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE, - switch_items); - } - } - else - { - x = 0; - w = it1->w; - _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE, - switch_items); - } - if (w > 0) - { - tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); - rects = eina_list_append(rects, tr); - tr->x = ln->x + it1->x + x; - tr->y = ln->par->y + ln->y; - tr->h = ln->h; - tr->w = w; - } - - while (it && (it != it2)) - { - max_x = it->x + it->adv; - it = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(it)->next; - } - if (min_x != max_x) - { - tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); - rects = eina_list_append(rects, tr); - tr->x = ln->x + min_x; - tr->y = ln->par->y + ln->y; - tr->h = ln->h; - tr->w = max_x - min_x; - } - if (it2->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Coord y, h; - Evas_Object_Textblock_Text_Item *ti; - int ret; - ti = _ITEM_TEXT(it2); - - ret = cur->ENFN->font_pen_coords_get(cur->ENDT, - ti->parent.format->font.font, - &ti->text_props, - end, - &x, &y, &w, &h); - if (!ret) - { - /* BUG! skip the last item */ - x = w = 0; - } - else - { - _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE, - switch_items); - } - } - else - { - x = 0; - w = it2->w; - _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE, - switch_items); - } - if (w > 0) - { - tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); - rects = eina_list_append(rects, tr); - tr->x = ln->x + it2->x + x; - tr->y = ln->par->y + ln->y; - tr->h = ln->h; - tr->w = w; - } - } - return rects; -} - -EAPI Eina_List * -evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln1, *ln2; - Evas_Object_Textblock_Item *it1, *it2; - Eina_List *rects = NULL; - Evas_Textblock_Rectangle *tr; - - if (!cur1 || !cur1->node) return NULL; - if (!cur2 || !cur2->node) return NULL; - if (cur1->obj != cur2->obj) return NULL; - o = (Evas_Object_Textblock *)(cur1->obj->object_data); - if (!o->formatted.valid) _relayout(cur1->obj); - if (evas_textblock_cursor_compare(cur1, cur2) > 0) - { - const Evas_Textblock_Cursor *tc; - - tc = cur1; - cur1 = cur2; - cur2 = tc; - } - - ln1 = ln2 = NULL; - it1 = it2 = NULL; - _find_layout_item_match(cur1, &ln1, &it1); - if (!ln1 || !it1) return NULL; - _find_layout_item_match(cur2, &ln2, &it2); - if (!ln2 || !it2) return NULL; - - if (ln1 == ln2) - { - rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1, - cur1, cur2); - } - else - { - Evas_Object_Textblock_Line *plni, *lni; - Eina_List *rects2 = NULL; - /* Handle the first line */ - rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1, - cur1, NULL); - - /* Handle the lines between the first and the last line */ - lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(ln1)->next; - if (!lni && (ln1->par != ln2->par)) - { - lni = ((Evas_Object_Textblock_Paragraph *) - EINA_INLIST_GET(ln1->par)->next)->lines; - } - while (lni && (lni != ln2)) - { - tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); - rects = eina_list_append(rects, tr); - tr->x = lni->x; - tr->y = lni->par->y + lni->y; - tr->h = lni->h; - tr->w = lni->w; - plni = lni; - lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next; - if (!lni && (plni->par != ln2->par)) - { - lni = ((Evas_Object_Textblock_Paragraph *) - EINA_INLIST_GET(plni->par)->next)->lines; - } - } - rects2 = _evas_textblock_cursor_range_in_line_geometry_get(ln2, - NULL, cur2); - rects = eina_list_merge(rects, rects2); - } - return rects; -} - -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) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Line *ln = NULL; - Evas_Object_Textblock_Format_Item *fi; - Evas_Object_Textblock_Item *it = NULL; - Evas_Coord x, y, w, h; - - if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; - o = (Evas_Object_Textblock *)(cur->obj->object_data); - if (!o->formatted.valid) _relayout(cur->obj); - if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; - _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->x + fi->parent.x; - y = ln->par->y + ln->y + ln->baseline + fi->y; - w = fi->parent.w; - h = fi->parent.h; - if (cx) *cx = x; - if (cy) *cy = y; - if (cw) *cw = w; - if (ch) *ch = h; - return EINA_TRUE; -} - -EAPI Eina_Bool -evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) -{ - Eina_Bool ret = EINA_FALSE; - Evas_Textblock_Cursor cur2; - if (!cur) return EINA_FALSE; - - cur2.obj = cur->obj; - evas_textblock_cursor_copy(cur, &cur2); - evas_textblock_cursor_line_char_last(&cur2); - if (cur2.pos == cur->pos) - { - ret = EINA_TRUE; - } - return ret; -} - -/* general controls */ -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) -{ - Evas_Object_Textblock_Line *ln; - - TB_HEAD_RETURN(0); - ln = _find_layout_line_num(obj, line); - if (!ln) return EINA_FALSE; - 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; -} - -EAPI void -evas_object_textblock_clear(Evas_Object *obj) -{ - Eina_List *l; - 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; - EINA_LIST_FOREACH(o->cursors, l, cur) - { - cur->node = NULL; - cur->pos = 0; - - } - _evas_textblock_changed(o, obj); -} - -EAPI void -evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) -{ - TB_HEAD(); - if (!o->formatted.valid) _relayout(obj); - if (w) *w = o->formatted.w; - if (h) *h = o->formatted.h; -} - -static void -_size_native_calc_line_finalize(const Evas_Object *obj, Eina_List *items, - Evas_Coord *ascent, Evas_Coord *descent, Evas_Coord *w) -{ - Evas_Object_Textblock_Item *it; - Eina_List *i; - - it = eina_list_data_get(items); - *w = 0; - - if (it) - { - /* 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); - - /* Add margins. */ - if (it->format) - *w = it->format->margin.l + it->format->margin.r; - } - - - /* Adjust all the item sizes according to the final line size, - * and update the x positions of all the items of the line. */ - EINA_LIST_FOREACH(items, i, it) - { - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) - { - Evas_Coord fw, fh, fy; - - Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); - if (!fi->formatme) goto loop_advance; - _layout_calculate_format_item_size(obj, fi, ascent, - descent, &fy, &fw, &fh); - } - -loop_advance: - *w += it->adv; - } -} - -/* 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; - Eina_List *line_items = NULL; - Evas_Coord w = 0, y = 0, wmax = 0, h = 0, ascent = 0, descent = 0; - - EINA_LIST_FOREACH(par->logical_items, i, it) - { - line_items = eina_list_append(line_items, 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))) - { - _size_native_calc_line_finalize(obj, line_items, &ascent, - &descent, &w); - - if (ascent + descent > h) - h = ascent + descent; - - y += h; - if (w > wmax) - wmax = w; - h = 0; - ascent = descent = 0; - line_items = eina_list_free(line_items); - } - else - { - Evas_Coord fw, fh, fy; - /* If there are no text items yet, calc ascent/descent - * according to the current format. */ - if (it && (ascent + descent == 0)) - _layout_format_ascent_descent_adjust(obj, &ascent, - &descent, it->format); - - _layout_calculate_format_item_size(obj, fi, &ascent, - &descent, &fy, &fw, &fh); - } - } - else - { - _layout_format_ascent_descent_adjust(obj, &ascent, - &descent, it->format); - } - } - - _size_native_calc_line_finalize(obj, line_items, &ascent, &descent, &w); - - line_items = eina_list_free(line_items); - - /* Do the last addition */ - if (ascent + descent > h) - h = ascent + descent; - - if (w > wmax) - wmax = w; - - *_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) - { - 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; -} - -EAPI void -evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) -{ - TB_HEAD(); - if (!o->formatted.valid) _relayout(obj); - if (l) *l = o->style_pad.l; - if (r) *r = o->style_pad.r; - if (t) *t = o->style_pad.t; - if (b) *b = o->style_pad.b; -} - -/** @internal - * FIXME: DELETE ME! DELETE ME! - * This is an ugly workaround to get around the fact that - * evas_object_textblock_coords_recalc isn't really called when it's supposed - * to. When that bug is fixed please remove this. */ -static void -_workaround_object_coords_recalc(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) -{ - evas_object_textblock_coords_recalc(obj); -} - -/* all nice and private */ -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(); - init_wordbreak(); - } -#endif - - /* alloc image ob, setup methods and default values */ - obj->object_data = evas_object_textblock_new(); - /* set up default settings for this kind of object */ - obj->cur.color.r = 255; - obj->cur.color.g = 255; - obj->cur.color.b = 255; - obj->cur.color.a = 255; - obj->cur.geometry.x = 0.0; - obj->cur.geometry.y = 0.0; - obj->cur.geometry.w = 0.0; - obj->cur.geometry.h = 0.0; - obj->cur.layer = 0; - /* set up object-specific settings */ - obj->prev = obj->cur; - /* set up methods (compulsory) */ - obj->func = &object_func; - obj->type = o_type; - - o = (Evas_Object_Textblock *)(obj->object_data); - o->cursor->obj = obj; - o->legacy_newline = EINA_TRUE; - evas_object_event_callback_priority_add(obj, EVAS_CALLBACK_RESIZE, -1000, - _workaround_object_coords_recalc, NULL); -} - -static void * -evas_object_textblock_new(void) -{ - Evas_Object_Textblock *o; - - /* alloc obj private data */ - EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textblock", Evas_Object_Textblock, 64, NULL); - o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textblock); - if (!o) return NULL; - EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textblock); - o->magic = MAGIC_OBJ_TEXTBLOCK; - o->cursor = calloc(1, sizeof(Evas_Textblock_Cursor)); - _format_command_init(); - return o; -} - -static void -evas_object_textblock_free(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - evas_object_textblock_clear(obj); - evas_object_textblock_style_set(obj, NULL); - while (evas_object_textblock_style_user_peek(obj)) - { - evas_object_textblock_style_user_pop(obj); - } - o = (Evas_Object_Textblock *)(obj->object_data); - free(o->cursor); - while (o->cursors) - { - Evas_Textblock_Cursor *cur; - - cur = (Evas_Textblock_Cursor *)o->cursors->data; - o->cursors = eina_list_remove_list(o->cursors, o->cursors); - 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(); -} - - -static void -evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) -{ - Evas_Object_Textblock_Paragraph *par, *start = NULL; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o; - int i, j; - int cx, cy, cw, ch, clip; - const char vals[5][5] = - { - {0, 1, 2, 1, 0}, - {1, 3, 4, 3, 1}, - {2, 4, 5, 4, 2}, - {1, 3, 4, 3, 1}, - {0, 1, 2, 1, 0} - }; - - /* render object to surface with context, and offxet by x,y */ - o = (Evas_Object_Textblock *)(obj->object_data); - obj->layer->evas->engine.func->context_multiplier_unset(output, - context); - /* FIXME: This clipping is just until we fix inset handling correctly. */ - ENFN->context_clip_clip(output, context, - obj->cur.geometry.x + x, - obj->cur.geometry.y + y, - obj->cur.geometry.w, - obj->cur.geometry.h); - clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch); - /* If there are no paragraphs and thus there are no lines, - * there's nothing left to do. */ - if (!o->paragraphs) return; - -#define ITEM_WALK() \ - 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; \ - \ - if (clip) \ - { \ - if ((obj->cur.geometry.y + y + par->y + ln->y + ln->h) < (cy - 20)) \ - continue; \ - if ((obj->cur.geometry.y + y + par->y + ln->y) > (cy + ch + 20)) \ - break; \ - } \ - EINA_INLIST_FOREACH(ln->items, itr) \ - { \ - Evas_Coord yoff; \ - yoff = ln->baseline; \ - if (itr->format->valign != -1.0) \ - { \ - yoff += itr->format->valign * (ln->h - itr->h); \ - } \ - if (clip) \ - { \ - if ((obj->cur.geometry.x + x + ln->x + itr->x + itr->w) < (cx - 20)) \ - continue; \ - 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() \ - while (0); \ - } \ - } \ - } \ - do {} while(0) -#define COLOR_SET(col) \ - ENFN->context_color_set(output, context, \ - (obj->cur.cache.clip.r * ti->parent.format->color.col.r) / 255, \ - (obj->cur.cache.clip.g * ti->parent.format->color.col.g) / 255, \ - (obj->cur.cache.clip.b * ti->parent.format->color.col.b) / 255, \ - (obj->cur.cache.clip.a * ti->parent.format->color.col.a) / 255); -#define COLOR_SET_AMUL(col, amul) \ - ENFN->context_color_set(output, context, \ - (obj->cur.cache.clip.r * ti->parent.format->color.col.r * (amul)) / 65025, \ - (obj->cur.cache.clip.g * ti->parent.format->color.col.g * (amul)) / 65025, \ - (obj->cur.cache.clip.b * ti->parent.format->color.col.b * (amul)) / 65025, \ - (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->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_props); - - /* backing */ -#define DRAW_RECT(ox, oy, ow, oh, or, og, ob, oa) \ - do \ - { \ - ENFN->context_color_set(output, \ - context, \ - (obj->cur.cache.clip.r * or) / 255, \ - (obj->cur.cache.clip.g * og) / 255, \ - (obj->cur.cache.clip.b * ob) / 255, \ - (obj->cur.cache.clip.a * oa) / 255); \ - ENFN->rectangle_draw(output, \ - context, \ - surface, \ - obj->cur.geometry.x + ln->x + x + (ox), \ - obj->cur.geometry.y + ln->par->y + ln->y + y + (oy), \ - (ow), \ - (oh)); \ - } \ - while (0) - -#define DRAW_FORMAT_DASHED(oname, oy, oh, dw, dp) \ - do \ - { \ - if (itr->format->oname) \ - { \ - unsigned char _or, _og, _ob, _oa; \ - int _ind, _dx = 0, _dn, _dr; \ - _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) \ - { \ - _dn = itr->w / (dw + dp); \ - _dr = itr->w % (dw + dp); \ - } \ - else \ - { \ - _dn = itr->adv / (dw + dp); \ - _dr = itr->adv % (dw + dp); \ - } \ - if (_dr > dw) _dr = dw; \ - for (_ind = 0 ; _ind < _dn ; _ind++) \ - { \ - DRAW_RECT(itr->x + _dx, oy, dw, oh, _or, _og, _ob, _oa); \ - _dx += dw + dp; \ - } \ - DRAW_RECT(itr->x + _dx, oy, _dr, oh, _or, _og, _ob, _oa); \ - } \ - } \ - while (0) - -#define DRAW_FORMAT(oname, oy, oh) \ - do \ - { \ - if (itr->format->oname) \ - { \ - unsigned char _or, _og, _ob, _oa; \ - _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); \ - } \ - } \ - } \ - 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; - } - - ITEM_WALK() - { - DRAW_FORMAT(backing, 0, ln->h); - } - ITEM_WALK_END(); - - /* There are size adjustments that depend on the styles drawn here back - * in "_text_item_update_sizes" should not modify one without the other. */ - - /* prepare everything for text draw */ - - /* shadows */ - ITEM_WALK() - { - int shad_dst, shad_sz, dx, dy, haveshad; - Evas_Object_Textblock_Text_Item *ti; - ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; - if (!ti) continue; - - shad_dst = shad_sz = dx = dy = haveshad = 0; - switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC) - { - 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) - { - switch (ti->parent.format->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; - } - dx *= shad_dst; - dy *= shad_dst; - } - switch (shad_sz) - { - case 0: - COLOR_SET(shadow); - DRAW_TEXT(dx, dy); - break; - case 2: - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - if (vals[i][j] != 0) - { - COLOR_SET_AMUL(shadow, vals[i][j] * 50); - DRAW_TEXT(i - 2 + dx, j - 2 + dy); - } - } - } - break; - default: - break; - } - } - } - ITEM_WALK_END(); - - /* glows */ - ITEM_WALK() - { - Evas_Object_Textblock_Text_Item *ti; - ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; - if (!ti) continue; - - if (ti->parent.format->style == EVAS_TEXT_STYLE_GLOW) - { - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - if (vals[i][j] != 0) - { - COLOR_SET_AMUL(glow, vals[i][j] * 50); - DRAW_TEXT(i - 2, j - 2); - } - } - } - COLOR_SET(glow2); - DRAW_TEXT(-1, 0); - DRAW_TEXT(1, 0); - DRAW_TEXT(0, -1); - DRAW_TEXT(0, 1); - } - } - ITEM_WALK_END(); - - /* outlines */ - ITEM_WALK() - { - Evas_Object_Textblock_Text_Item *ti; - ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; - if (!ti) continue; - - if ((ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE) || - (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) || - (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)) - { - COLOR_SET(outline); - DRAW_TEXT(-1, 0); - DRAW_TEXT(1, 0); - DRAW_TEXT(0, -1); - DRAW_TEXT(0, 1); - } - else if (ti->parent.format->style == EVAS_TEXT_STYLE_SOFT_OUTLINE) - { - for (j = 0; j < 5; j++) - { - for (i = 0; i < 5; i++) - { - if (((i != 2) || (j != 2)) && (vals[i][j] != 0)) - { - COLOR_SET_AMUL(outline, vals[i][j] * 50); - DRAW_TEXT(i - 2, j - 2); - } - } - } - } - } - ITEM_WALK_END(); - - /* normal text and lines */ - ITEM_WALK() - { - Evas_Object_Textblock_Text_Item *ti; - ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL; - /* NORMAL TEXT */ - if (ti) - { - COLOR_SET(normal); - DRAW_TEXT(0, 0); - } - - /* STRIKETHROUGH */ - DRAW_FORMAT(strikethrough, (ln->h / 2), 1); - - /* UNDERLINE */ - DRAW_FORMAT(underline, ln->baseline + 1, 1); - - /* UNDERLINE DASHED */ - DRAW_FORMAT_DASHED(underline_dash, ln->baseline + 1, 1, - ti->parent.format->underline_dash_width, - ti->parent.format->underline_dash_gap); - - /* UNDERLINE2 */ - DRAW_FORMAT(underline2, ln->baseline + 3, 1); - } - ITEM_WALK_END(); -} - -static void -evas_object_textblock_render_pre(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - int is_v, was_v; - - /* dont pre-render the obj twice! */ - if (obj->pre_render_done) return; - obj->pre_render_done = 1; - /* pre-render phase. this does anything an object needs to do just before */ - /* rendering. this could mean loading the image data, retrieving it from */ - /* elsewhere, decoding video etc. */ - /* 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) || (o->format_changed) || - ((obj->cur.geometry.w != o->last_w) || - (((o->valign != 0.0) || (o->have_ellipsis)) && - (obj->cur.geometry.h != o->last_h)))) - { - _relayout(obj); - o->redraw = 0; - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - goto done; - } - if (o->redraw) - { - o->redraw = 0; - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - goto done; - } - /* if someone is clipping this obj - go calculate the clipper */ - if (obj->cur.clipper) - { - if (obj->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - obj->cur.clipper->func->render_pre(obj->cur.clipper); - } - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(obj); - was_v = evas_object_was_visible(obj); - if (is_v != was_v) - { - evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); - goto done; - } - 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); - goto done; - } - /* it's not visible - we accounted for it appearing or not so just abort */ - if (!is_v) goto done; - /* clipper changed this is in addition to anything else for obj */ - evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); - /* if we restacked (layer or just within a layer) and don't clip anyone */ - if (obj->restack) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed color */ - if ((obj->cur.color.r != obj->prev.color.r) || - (obj->cur.color.g != obj->prev.color.g) || - (obj->cur.color.b != obj->prev.color.b) || - (obj->cur.color.a != obj->prev.color.a)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - /* if it changed geometry - and obviously not visibility or color */ - /* calculate differences since we have a constant color fill */ - /* we really only need to update the differences */ - if ((obj->cur.geometry.x != obj->prev.geometry.x) || - (obj->cur.geometry.y != obj->prev.geometry.y) || - (obj->cur.geometry.w != obj->prev.geometry.w) || - (obj->cur.geometry.h != obj->prev.geometry.h)) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); - goto done; - } - done: - evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); -} - -static void -evas_object_textblock_render_post(Evas_Object *obj) -{ -/* Evas_Object_Textblock *o; */ - - /* this moves the current data to the previous state parts of the object */ - /* in whatever way is safest for the object. also if we don't need object */ - /* data anymore we can free it if the object deems this is a good idea */ -/* o = (Evas_Object_Textblock *)(obj->object_data); */ - /* remove those pesky changes */ - evas_object_clip_changes_clean(obj); - /* move cur to prev safely for object data */ - obj->prev = obj->cur; -/* o->prev = o->cur; */ -/* o->changed = 0; */ -} - -static unsigned int evas_object_textblock_id_get(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_TEXTBLOCK; -} - -static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - if (!o) return 0; - return MAGIC_OBJ_CUSTOM; -} - -static void *evas_object_textblock_engine_data_get(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - if (!o) return NULL; - return o->engine_data; -} - -static int -evas_object_textblock_is_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object is */ - /* currently fulyl opque over the entire gradient it occupies */ - return 0; -} - -static int -evas_object_textblock_was_opaque(Evas_Object *obj __UNUSED__) -{ - /* this returns 1 if the internal object data implies that the object was */ - /* currently fulyl opque over the entire gradient it occupies */ - return 0; -} - -static void -evas_object_textblock_coords_recalc(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - if ((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; - o->changed = 1; - } -} - -static void -evas_object_textblock_scale_update(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - - o = (Evas_Object_Textblock *)(obj->object_data); - _evas_textblock_invalidate_all(o); - _evas_textblock_changed(o, obj); -} - -void -_evas_object_textblock_rehint(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Paragraph *par; - Evas_Object_Textblock_Line *ln; - - o = (Evas_Object_Textblock *)(obj->object_data); - EINA_INLIST_FOREACH(o->paragraphs, par) - { - EINA_INLIST_FOREACH(par->lines, ln) - { - Evas_Object_Textblock_Item *it; - - EINA_INLIST_FOREACH(ln->items, it) - { - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - if (ti->parent.format->font.font) - { -#ifdef EVAS_FRAME_QUEUING - 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, - obj->layer->evas->hinting); - } - } - } - } - } - _evas_textblock_invalidate_all(o); - _evas_textblock_changed(o, obj); -} - -/** - * @} - */ - -#ifdef HAVE_TESTS -/* return EINA_FALSE on error, used in unit_testing */ -EAPI Eina_Bool -_evas_textblock_check_item_node_link(Evas_Object *obj) -{ - Evas_Object_Textblock *o; - Evas_Object_Textblock_Paragraph *par; - Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock_Item *it; - - o = (Evas_Object_Textblock *)(obj->object_data); - if (!o) return EINA_FALSE; - - if (!o->formatted.valid) _relayout(obj); - - EINA_INLIST_FOREACH(o->paragraphs, par) - { - EINA_INLIST_FOREACH(par->lines, ln) - { - EINA_INLIST_FOREACH(ln->items, it) - { - if (it->text_node != par->text_node) - return EINA_FALSE; - } - } - } - return EINA_TRUE; -} - -EAPI int -_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n) -{ - return n->offset; -} -#endif - -#if 0 -/* Good for debugging */ -void -pfnode(Evas_Object_Textblock_Node_Format *n) -{ - printf("Format Node: %p\n", n); - printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last); - printf("text_node = %p, offset = %u, visible = %d\n", n->text_node, n->offset, n->visible); - printf("'%s'\n", eina_strbuf_string_get(n->format)); -} - -void -ptnode(Evas_Object_Textblock_Node_Text *n) -{ - printf("Text Node: %p\n", n); - printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last); - printf("format_node = %p\n", n->format_node); - printf("'%ls'\n", eina_ustrbuf_string_get(n->unicode)); -} - -void -pitem(Evas_Object_Textblock_Item *it) -{ - Evas_Object_Textblock_Text_Item *ti; - Evas_Object_Textblock_Format_Item *fi; - printf("Item: %p\n", it); - printf("Type: %s (%d)\n", (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? - "TEXT" : "FORMAT", it->type); - printf("Text pos: %d Visual pos: %d\n", it->text_pos, -#ifdef BIDI_SUPPORT - it->visual_pos -#else - it->text_pos -#endif - ); - printf("Coords: x = %d w = %d adv = %d\n", (int) it->x, (int) it->w, - (int) it->adv); - if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) - { - ti = _ITEM_TEXT(it); - printf("Text: '%*ls'\n", ti->text_props.text_len, GET_ITEM_TEXT(ti)); - } - else - { - fi = _ITEM_FORMAT(it); - printf("Format: '%s'\n", fi->item); - } -} - -void -ppar(Evas_Object_Textblock_Paragraph *par) -{ - Evas_Object_Textblock_Item *it; - Eina_List *i; - EINA_LIST_FOREACH(par->logical_items, i, it) - { - printf("***********************\n"); - pitem(it); - } -} - -#endif - diff --git a/libraries/evas/src/lib/canvas/evas_rectangle.c b/libraries/evas/src/lib/canvas/evas_rectangle.c deleted file mode 100644 index da6b701..0000000 --- a/libraries/evas/src/lib/canvas/evas_rectangle.c +++ /dev/null @@ -1,98 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -void -evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh) -{ - if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh)) - { - evas_add_rect(rects, x, y, w, h); - evas_add_rect(rects, xx, yy, ww, hh); - } - else - { - int pt_x[4], pt_y[4], i, j; - - if (x < xx) - { - pt_x[0] = x; - pt_x[1] = xx; - } - else - { - pt_x[0] = xx; - pt_x[1] = x; - } - if ((x + w) < (xx + ww)) - { - pt_x[2] = x + w; - pt_x[3] = xx + ww; - } - else - { - pt_x[2] = xx + ww; - pt_x[3] = x + w; - } - if (y < yy) - { - pt_y[0] = y; - pt_y[1] = yy; - } - else - { - pt_y[0] = yy; - pt_y[1] = y; - } - if ((y + h) < (yy + hh)) - { - pt_y[2] = y + h; - pt_y[3] = yy + hh; - } - else - { - pt_y[2] = yy + hh; - pt_y[3] = y + h; - } - for (j = 0; j < 3; j++) - { - for (i = 0; i < 3; i++) - { - int intsec1, intsec2; - int tx, ty, tw, th; - - 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)); - if (intsec1 ^ intsec2) - { - evas_add_rect(rects, tx, ty, tw, th); - } - } - } -/* if (tmp.count > 0) */ -/* { */ -/* unsigned int i; */ - -/* for (i = 0; i < tmp.count; ++i) */ -/* { */ -/* if ((tmp.array[i].w > 0) && (tmp.array[i].h > 0)) */ -/* { */ -/* int intsec1, intsec2; */ - -/* intsec1 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, x, y, w, h)); */ -/* intsec2 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, xx, yy, ww, hh)); */ -/* if (intsec1 ^ intsec2) */ -/* { */ -/* evas_add_rect(rects, tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h); */ -/* } */ -/* } */ -/* } */ -/* free(tmp.array); */ -/* } */ - - } -} diff --git a/libraries/evas/src/lib/canvas/evas_render.c b/libraries/evas/src/lib/canvas/evas_render.c deleted file mode 100644 index 32ce988..0000000 --- a/libraries/evas/src/lib/canvas/evas_render.c +++ /dev/null @@ -1,1914 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" -#include - -// debug rendering -/* #define REND_DGB 1 */ -/* #define STDOUT_DBG 1 */ - -#ifdef REND_DGB -static FILE *dbf = NULL; - -static void -rend_dbg(const char *txt) -{ - if (!dbf) - { -#ifdef STDOUT_DBG - dbf = stdout; -#else - dbf = fopen("EVAS-RENDER-DEBUG.log", "w"); -#endif - if (!dbf) return; - } - fputs(txt, dbf); - fflush(dbf); -} -#define RD(args...) \ - { \ - char __tmpbuf[4096]; \ - \ - snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ - rend_dbg(__tmpbuf); \ - } -#define RDI(xxxx) \ - { \ - char __tmpbuf[4096]; int __tmpi; \ - for (__tmpi = 0; __tmpi < xxxx; __tmpi++) \ - __tmpbuf[__tmpi] = ' '; \ - __tmpbuf[__tmpi] = 0; \ - rend_dbg(__tmpbuf); \ - } -#else -#define RD(args...) -#define RDI(x) -#endif - -static Eina_List * -evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw); - -EAPI void -evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) -{ - Eina_Rectangle *r; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - NEW_RECT(r, x, y, w, h); - if (!r) return; - e->damages = eina_list_append(e->damages, r); - e->changed = 1; -} - -EAPI void -evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) -{ - Eina_Rectangle *r; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - NEW_RECT(r, x, y, w, h); - if (!r) return; - e->obscures = eina_list_append(e->obscures, r); -} - -EAPI void -evas_obscured_clear(Evas *e) -{ - Eina_Rectangle *r; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - EINA_LIST_FREE(e->obscures, r) - { - eina_rectangle_free(r); - } -} - -static Eina_Bool -_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)); -} - -static Eina_Bool -_evas_render_had_map(Evas_Object *obj) -{ - return ((obj->prev.map) && (obj->prev.usemap)); - // return ((!obj->cur.map) && (obj->prev.usemap)); -} - -static Eina_Bool -_evas_render_is_relevant(Evas_Object *obj) -{ - return ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || - (evas_object_was_visible(obj) && (!obj->prev.have_clipees))); -} - -static Eina_Bool -_evas_render_can_render(Evas_Object *obj) -{ - return (evas_object_is_visible(obj) && (!obj->cur.have_clipees)); -} - -static void -_evas_render_prev_cur_clip_cache_add(Evas *e, Evas_Object *obj) -{ - e->engine.func->output_redraws_rect_add(e->engine.data.output, - obj->prev.cache.clip.x, - obj->prev.cache.clip.y, - obj->prev.cache.clip.w, - obj->prev.cache.clip.h); - e->engine.func->output_redraws_rect_add(e->engine.data.output, - obj->cur.cache.clip.x, - obj->cur.cache.clip.y, - obj->cur.cache.clip.w, - obj->cur.cache.clip.h); -} - -static void -_evas_render_cur_clip_cache_del(Evas *e, Evas_Object *obj) -{ - Evas_Coord x, y, w, h; - - x = obj->cur.cache.clip.x; - y = obj->cur.cache.clip.y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - if (obj->cur.clipper) - { - 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); - } - e->engine.func->output_redraws_rect_del(e->engine.data.output, - x, y, w, h); -} - -static void -_evas_render_phase1_direct(Evas *e, - Eina_Array *active_objects, - Eina_Array *restack_objects __UNUSED__, - Eina_Array *delete_objects __UNUSED__, - Eina_Array *render_objects) -{ - unsigned int i; - Eina_List *l; - 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; - - obj = eina_array_data_get(render_objects, i); - RD(" OBJ [%p] changed %i\n", obj, 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) - { - obj->proxy.redraw = 1; - EINA_LIST_FOREACH(obj->proxy.proxies, l, 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) - { - RD(" pre-render-done smart:%p|%p [%p, %i] | [%p, %i] has_map:%i had_map:%i\n", - obj->smart.smart, - evas_object_smart_members_get_direct(obj), - obj->cur.map, obj->cur.usemap, - obj->prev.map, obj->prev.usemap, - _evas_render_has_map(obj), - _evas_render_had_map(obj)); - if ((obj->smart.smart) && - (_evas_render_has_map(obj))) - { - RD(" has map + smart\n"); - _evas_render_prev_cur_clip_cache_add(e, obj); - } - } - else if (_evas_render_had_map(obj)) - { - RD(" no pre-render done\n"); - _evas_render_prev_cur_clip_cache_add(e, obj); - } - } - else - { - if (obj->smart.smart) - { - // obj->func->render_pre(obj); - } - else if ((obj->rect_del) || - (evas_object_is_opaque(obj) && evas_object_is_visible(obj))) - { - RD(" rect del\n"); - _evas_render_cur_clip_cache_del(e, obj); - } - } - } - RD(" ---]\n"); -} - -static Eina_Bool -_evas_render_phase1_object_process(Evas *e, Evas_Object *obj, - Eina_Array *active_objects, - Eina_Array *restack_objects, - Eina_Array *delete_objects, - Eina_Array *render_objects, - int restack, int map, - int *redraw_all -#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; - -#ifndef EVAS_FRAME_QUEUING - /* 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) -#endif - 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; - - /* build active object list */ - evas_object_clip_recalc(obj); - is_active = evas_object_is_active(obj); - obj->is_active = is_active; - - RDI(level); - RD(" [--- PROCESS [%p] '%s' active = %i, del = %i | %i %i %ix%i\n", obj, obj->type, is_active, obj->delete_me, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); - if ((is_active) || (obj->delete_me != 0)) - eina_array_push(active_objects, obj); - -#ifdef REND_DGB - if (!is_active) - { - RDI(level); - RD(" [%p] vis: %i, cache.clip.vis: %i cache.clip.a: %i [%p]\n", obj, obj->cur.visible, obj->cur.cache.clip.visible, obj->cur.cache.clip.a, obj->func->is_visible); - } -#endif - - map = _evas_render_has_map(obj); - hmap = _evas_render_had_map(obj); - - if ((restack) && (!map)) - { - if (!obj->changed) - { - eina_array_push(&e->pending_objects, obj); - obj->changed = 1; - } - obj->restack = 1; - clean_them = EINA_TRUE; - } - - if (map) - { - RDI(level); - RD(" obj mapped\n"); - if (obj->changed) - { - if (map != hmap) - { - *redraw_all = 1; - } - evas_object_clip_recalc(obj); - if ((obj->restack) && - (is_active) && (!obj->clip.clipees) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || - (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) - { - eina_array_push(render_objects, obj); - _evas_render_prev_cur_clip_cache_add(e, obj); - obj->render_pre = 1; - } - else if ((is_active) && (!obj->clip.clipees) && - ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || - (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) - { - eina_array_push(render_objects, obj); - _evas_render_prev_cur_clip_cache_add(e, obj); - obj->render_pre = 1; - } - } - return clean_them; - } - else if (_evas_render_had_map(obj)) - { - RDI(level); - RD(" had map - restack objs\n"); - // eina_array_push(restack_objects, obj); - _evas_render_prev_cur_clip_cache_add(e, obj); - if (obj->changed) - { - if (hmap) - { - if (!map) - { - if ((obj->cur.map) && (obj->cur.usemap)) map = 1; - } - } - if (map != hmap) - { - *redraw_all = 1; - } - } - } - - /* handle normal rendering. this object knows how to handle maps */ - if (obj->changed) - { - 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, - map, - redraw_all -#ifdef REND_DGB - , level + 1 -#endif - ); - } - } - else - { - if ((is_active) && (!obj->clip.clipees) && - _evas_render_is_relevant(obj)) - { - RDI(level); - RD(" relevant + active\n"); - if (obj->restack) - eina_array_push(restack_objects, obj); - else - { - eina_array_push(render_objects, obj); - obj->render_pre = 1; - } - } - else - { - RDI(level); - RD(" skip - not smart, not active or clippees or not relevant\n"); - } - } - } - else - { - RD(" not changed... [%i] -> (%i %i %p %i) [%i]\n", - 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) - { - 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 -#ifdef REND_DGB - , level + 1 -#endif - ); - } - } - 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; - } - else if (evas_object_is_visible(obj)) - { - RDI(level); - RD(" visible\n"); - eina_array_push(render_objects, obj); - obj->render_pre = 1; - } - else - { - 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; -} - -static Eina_Bool -_evas_render_phase1_process(Evas *e, - Eina_Array *active_objects, - Eina_Array *restack_objects, - Eina_Array *delete_objects, - Eina_Array *render_objects, - int *redraw_all) -{ - Evas_Layer *lay; - Eina_Bool clean_them = EINA_FALSE; - - RD(" [--- PHASE 1\n"); - EINA_INLIST_FOREACH(e->layers, lay) - { - 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 -#ifdef REND_DGB - , 1 -#endif - ); - } - } - RD(" ---]\n"); - return clean_them; -} - -static void -_evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e) -{ - unsigned int i; - - for (i = 0; i < pending_objects->count; ++i) - { - Evas_Object *obj; - int is_active, ok = 0; - - obj = eina_array_data_get(pending_objects, i); - - if (!obj->layer) goto clean_stuff; - - evas_object_clip_recalc(obj); - is_active = evas_object_is_active(obj); - - 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; - } - 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 ; - } - } -} - -Eina_Bool -pending_change(void *data, void *gdata __UNUSED__) -{ - Evas_Object *obj; - - obj = data; - if (obj->delete_me) return EINA_FALSE; - if (obj->pre_render_done) - { - 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 - obj->changed = 0; - obj->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - obj->changed_map = 0; - obj->changed_pchange = 0; - } - return obj->changed ? EINA_TRUE : EINA_FALSE; -} -/* - static void - unchange(Evas_Object *obj) - { - Evas_Object *obj2; - - if (!obj->changed) return; - obj->changed = 0; - obj->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) - { - unchange(obj2); - } - } - - 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); - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) - { - if (obj2->changed) - ret |= chlist(obj2, i + 1); - } - } - */ -static Eina_Bool -_evas_render_can_use_overlay(Evas *e, Evas_Object *obj) -{ - Eina_Rectangle *r; - Evas_Object *tmp; - Eina_List *alphas = NULL; - Eina_List *opaques = NULL; - Evas_Object *video_parent = NULL; - Eina_Rectangle zone; - Evas_Coord xc1, yc1, xc2, yc2; - unsigned int i; - Eina_Bool nooverlay; - - video_parent = _evas_object_image_video_parent_get(obj); - - /* Check if any one is the stack make this object mapped */ - tmp = obj; - while (tmp && !_evas_render_has_map(tmp)) - tmp = tmp->smart.parent; - - if (tmp && _evas_render_has_map(tmp)) return EINA_FALSE; /* we are mapped, we can't be an overlay */ - - if (!evas_object_is_visible(obj)) return EINA_FALSE; /* no need to update the overlay if it's not visible */ - - /* If any recoloring of the surface is needed, n overlay to */ - if ((obj->cur.cache.clip.r != 255) || - (obj->cur.cache.clip.g != 255) || - (obj->cur.cache.clip.b != 255) || - (obj->cur.cache.clip.a != 255)) - return EINA_FALSE; - - /* Check presence of transparent object on top of the video object */ - EINA_RECTANGLE_SET(&zone, - obj->cur.cache.clip.x, - obj->cur.cache.clip.y, - obj->cur.cache.clip.w, - obj->cur.cache.clip.h); - - for (i = e->active_objects.count - 1; i > 0; i--) - { - Eina_Rectangle self; - Eina_Rectangle *match; - Evas_Object *current; - Eina_List *l; - int xm1, ym1, xm2, ym2; - - current = eina_array_data_get(&e->active_objects, i); - - /* Did we find the video object in the stack ? */ - if (current == video_parent || current == obj) - break; - - EINA_RECTANGLE_SET(&self, - current->cur.cache.clip.x, - current->cur.cache.clip.y, - current->cur.cache.clip.w, - current->cur.cache.clip.h); - - /* This doesn't cover the area of the video object, so don't bother with that object */ - if (!eina_rectangles_intersect(&zone, &self)) - continue ; - - xc1 = current->cur.cache.clip.x; - yc1 = current->cur.cache.clip.y; - xc2 = current->cur.cache.clip.x + current->cur.cache.clip.w; - yc2 = current->cur.cache.clip.y + current->cur.cache.clip.h; - - if (evas_object_is_visible(current) && - (!current->clip.clipees) && - (current->cur.visible) && - (!current->delete_me) && - (current->cur.cache.clip.visible) && - (!current->smart.smart)) - { - Eina_Bool included = EINA_FALSE; - - if (evas_object_is_opaque(current) || - ((current->func->has_opaque_rect) && - (current->func->has_opaque_rect(current)))) - { - /* The object is opaque */ - - /* Check if the opaque object is inside another opaque object */ - EINA_LIST_FOREACH(opaques, l, match) - { - xm1 = match->x; - ym1 = match->y; - xm2 = match->x + match->w; - ym2 = match->y + match->h; - - /* Both object are included */ - if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) - { - included = EINA_TRUE; - break; - } - } - - /* Not included yet */ - if (!included) - { - Eina_List *ln; - Evas_Coord xn2, yn2; - - r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, - current->cur.cache.clip.w, current->cur.cache.clip.h); - - opaques = eina_list_append(opaques, r); - - xn2 = r->x + r->w; - yn2 = r->y + r->h; - - /* Remove all the transparent object that are covered by the new opaque object */ - EINA_LIST_FOREACH_SAFE(alphas, l, ln, match) - { - xm1 = match->x; - ym1 = match->y; - xm2 = match->x + match->w; - ym2 = match->y + match->h; - - if (xm1 >= r->x && ym1 >= r->y && xm2 <= xn2 && ym2 <= yn2) - { - /* The new rectangle is over some transparent object, - so remove the transparent object */ - alphas = eina_list_remove_list(alphas, l); - } - } - } - } - else - { - /* The object has some transparency */ - - /* Check if the transparent object is inside any other transparent object */ - EINA_LIST_FOREACH(alphas, l, match) - { - xm1 = match->x; - ym1 = match->y; - xm2 = match->x + match->w; - ym2 = match->y + match->h; - - /* Both object are included */ - if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) - { - included = EINA_TRUE; - break; - } - } - - /* If not check if it is inside any opaque one */ - if (!included) - { - EINA_LIST_FOREACH(opaques, l, match) - { - xm1 = match->x; - ym1 = match->y; - xm2 = match->x + match->w; - ym2 = match->y + match->h; - - /* Both object are included */ - if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) - { - included = EINA_TRUE; - break; - } - } - } - - /* No inclusion at all, so add it */ - if (!included) - { - r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, - current->cur.cache.clip.w, current->cur.cache.clip.h); - - alphas = eina_list_append(alphas, r); - } - } - } - } - - /* If there is any pending transparent object, then no overlay */ - nooverlay = !!eina_list_count(alphas); - - EINA_LIST_FREE(alphas, r) - eina_rectangle_free(r); - EINA_LIST_FREE(opaques, r) - eina_rectangle_free(r); - - if (nooverlay) - return EINA_FALSE; - - return EINA_TRUE; -} - -Eina_Bool -evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, - int off_x, int off_y, int mapped, - int ecx, int ecy, int ecw, int ech -#ifdef REND_DGB - , int level -#endif - ) -{ - void *ctx; - Evas_Object *obj2; - Eina_Bool clean_them = EINA_FALSE; - - evas_object_clip_recalc(obj); - RDI(level); - RD(" { evas_render_mapped(%p, %p, %p, %p, %i, %i, %i, %i)\n", e, obj, context, surface, off_x, off_y, mapped, level); - if (mapped) - { - if ((!evas_object_is_visible(obj)) || (obj->clip.clipees) || - (obj->cur.have_clipees)) - { - RDI(level); - RD(" }\n"); - return clean_them; - } - } - else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) && - (_evas_render_can_render(obj)))) - )) - { - RDI(level); - RD(" }\n"); - return clean_them; - } - - // 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)); - if (_evas_render_has_map(obj)) - { - const Evas_Map_Point *p, *p_end; - RGBA_Map_Point pts[4], *pt; - int sw, sh; - int changed = 0, rendered = 0; - - clean_them = EINA_TRUE; - - sw = obj->cur.geometry.w; - sh = obj->cur.geometry.h; - RDI(level); - RD(" mapped obj: %ix%i\n", sw, sh); - if ((sw <= 0) || (sh <= 0)) - { - RDI(level); - RD(" }\n"); - return clean_them; - } - - 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; - pts[0].z0 = obj->cur.map->persp.z0 << FP; - - p = obj->cur.map->points; - p_end = p + obj->cur.map->count; - pt = pts; - for (; p < p_end; p++, pt++) - { - pt->x = (lround(p->x) + off_x) * FP1; - pt->y = (lround(p->y) + off_y) * FP1; - pt->z = (lround(p->z) ) * FP1; - pt->fx = p->px; - pt->fy = p->py; - pt->fz = p->z; - pt->u = lround(p->u) * FP1; - pt->v = lround(p->v) * FP1; - if (pt->u < 0) pt->u = 0; - else if (pt->u > (sw * FP1)) pt->u = (sw * FP1); - if (pt->v < 0) pt->v = 0; - else if (pt->v > (sh * FP1)) pt->v = (sh * FP1); - pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b); - } - /* Copy last for software engine */ - if (obj->cur.map->count & 0x1) - { - pts[obj->cur.map->count] = pts[obj->cur.map->count - 1]; - } - - - if (obj->cur.map->surface) - { - if ((obj->cur.map->surface_w != sw) || - (obj->cur.map->surface_h != sh)) - { - 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); - obj->cur.map->surface = NULL; - } - } - if (!obj->cur.map->surface) - { - obj->cur.map->surface_w = sw; - 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); - RDI(level); - RD(" fisrt surf: %ix%i\n", sw, sh); - changed = 1; - } - if (obj->smart.smart) - { - Evas_Object *o2; - - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), o2) - { - if (!evas_object_is_visible(o2) && - !evas_object_was_visible(o2)) - { - o2->changed = 0; - o2->changed_move_only = 0; - o2->changed_nomove = 0; - o2->changed_move = 0; - o2->changed_map = 0; - o2->changed_pchange = 0; - continue; - } - if (o2->changed) - { - // chlist(o2, 0); - changed = 1; - o2->changed = 0; - o2->changed_move_only = 0; - o2->changed_nomove = 0; - o2->changed_move = 0; - o2->changed_map = 0; - o2->changed_pchange = 0; - break; - } - } - // unchange(obj); - obj->changed = 0; - obj->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - obj->changed_map = 0; - obj->changed_pchange = 0; - } - else - { - if (obj->changed) - { - if ((obj->changed_pchange) && (obj->changed_map)) - changed = 1; - obj->changed = 0; - obj->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - obj->changed_map = 0; - obj->changed_pchange = 0; - } - } - - // clear surface before re-render - 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 - // and re-render those - if (obj->cur.map->alpha) - { - 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, - obj->cur.map->surface, - 0, 0, - obj->cur.map->surface_w, - obj->cur.map->surface_h); - e->engine.func->context_free(e->engine.data.output, ctx); - } - ctx = e->engine.func->context_new(e->engine.data.output); - off_x2 = -obj->cur.geometry.x; - off_y2 = -obj->cur.geometry.y; - 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 -#ifdef REND_DGB - , level + 1 -#endif - ); - } - } - else - { - int x = 0, y = 0, w = 0, h = 0; - - w = obj->cur.map->surface_w; - h = obj->cur.map->surface_h; - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.geometry.x + off_x2, - obj->cur.geometry.y + off_y2, - obj->cur.geometry.w, - obj->cur.geometry.h); - - e->engine.func->context_clip_set(e->engine.data.output, - ctx, x, y, w, h); - obj->func->render(obj, e->engine.data.output, ctx, - obj->cur.map->surface, off_x2, off_y2); - } - e->engine.func->context_free(e->engine.data.output, ctx); - rendered = 1; - } - - RDI(level); - RD(" draw map\n"); - - 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.func->context_clip_unset(e->engine.data.output, - e->engine.data.context); - if (obj->cur.map->surface) - { - if (obj->smart.smart) - { - if (obj->cur.clipper) - { - 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; - evas_object_clip_recalc(obj); - obj->cur.map_parent = tobj; - 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); - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x + off_x, y + off_y, w, h); - } - } - else - { - 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); - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x + off_x, y + off_y, w, h); - } - } - } -// if (surface == e->engine.data.output) - 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); - } - // 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; - } - else - { - if (mapped) - { - RDI(level); - RD(" draw child of mapped obj\n"); - ctx = e->engine.func->context_new(e->engine.data.output); - 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 -#ifdef REND_DGB - , level + 1 -#endif - ); - } - } - else - { - if (!obj->cur.map) - { - int x, y, w, h; - - RDI(level); - - x = obj->cur.cache.clip.x + off_x; - y = obj->cur.cache.clip.y + off_y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - - if (obj->cur.clipper) - { - if (_evas_render_has_map(obj)) - evas_object_clip_recalc(obj); - - RD(" clipper: %i %i %ix%i\n", - obj->cur.clipper->cur.cache.clip.x + off_x, - obj->cur.clipper->cur.cache.clip.y + off_y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); - - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.clipper->cur.cache.clip.x + off_x, - obj->cur.clipper->cur.cache.clip.y + off_y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); - } - - 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.w, - obj->cur.cache.clip.h, - obj->cur.geometry.x + off_x, - obj->cur.geometry.y + off_y, - obj->cur.geometry.w, - obj->cur.geometry.h); - e->engine.func->context_clip_set(e->engine.data.output, - ctx, x, y, w, h); - } - else - { - RDI(level); - RD(" noclip\n"); - } - 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); - */ - } - e->engine.func->context_free(e->engine.data.output, ctx); - } - else - { - if (obj->cur.clipper) - { - int x, y, w, h; - - if (_evas_render_has_map(obj)) - 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); - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x + off_x, y + off_y, w, h); - e->engine.func->context_clip_clip(e->engine.data.output, - e->engine.data.context, - ecx, ecy, ecw, ech); - } - - RDI(level); - RD(" draw normal obj\n"); - obj->func->render(obj, e->engine.data.output, context, surface, - off_x, off_y); - } - } - RDI(level); - RD(" }\n"); - - return clean_them; -} - -static void -_evas_render_cutout_add(Evas *e, Evas_Object *obj, int off_x, int off_y) -{ - if (evas_object_is_opaque(obj)) - { - Evas_Coord cox, coy, cow, coh; - - cox = obj->cur.cache.clip.x; - coy = obj->cur.cache.clip.y; - cow = obj->cur.cache.clip.w; - coh = obj->cur.cache.clip.h; - if ((obj->cur.map) && (obj->cur.usemap)) - { - Evas_Object *oo; - - oo = obj; - while (oo->cur.clipper) - { - if ((oo->cur.clipper->cur.map_parent - != oo->cur.map_parent) && - (!((oo->cur.map) && (oo->cur.usemap)))) - break; - RECTS_CLIP_TO_RECT(cox, coy, cow, coh, - oo->cur.geometry.x, - oo->cur.geometry.y, - oo->cur.geometry.w, - oo->cur.geometry.h); - oo = oo->cur.clipper; - } - } - e->engine.func->context_cutout_add - (e->engine.data.output, e->engine.data.context, - cox + off_x, coy + off_y, cow, coh); - } - 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(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 - (e->engine.data.output, e->engine.data.context, - obx, oby, obw, obh); - } - } - } -} - -static Eina_List * -evas_render_updates_internal(Evas *e, - unsigned char make_updates, - unsigned char do_draw) -{ - Evas_Object *obj; - Eina_List *updates = NULL; - Eina_List *ll; - void *surface; - Eina_Bool clean_them = EINA_FALSE; - Eina_Bool alpha; - Eina_Rectangle *r; - int ux, uy, uw, uh; - int cx, cy, cw, ch; - unsigned int i, j; - int haveup = 0; - int redraw_all = 0; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - if (!e->changed) return NULL; - - evas_call_smarts_calculate(e); - - RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h); - - evas_event_callback_call(e, EVAS_CALLBACK_RENDER_PRE, NULL); - - /* Check if the modified object mean recalculating every thing */ - if (!e->invalidate) - _evas_render_check_pending_objects(&e->pending_objects, e); - - /* phase 1. add extra updates for changed objects */ - if (e->invalidate || e->render_objects.count <= 0) - clean_them = _evas_render_phase1_process(e, - &e->active_objects, - &e->restack_objects, - &e->delete_objects, - &e->render_objects, - &redraw_all); - - /* phase 1.5. check if the video should be inlined or stay in their overlay */ - alpha = e->engine.func->canvas_alpha_get(e->engine.data.output, - e->engine.data.context); - - EINA_LIST_FOREACH(e->video_objects, ll, obj) - { - /* we need the surface to be transparent to display the underlying overlay */ - if (alpha && _evas_render_can_use_overlay(e, obj)) - _evas_object_image_video_overlay_show(obj); - else - _evas_object_image_video_overlay_hide(obj); - } - - - /* phase 1.8. pre render for proxy */ - _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects, - &e->delete_objects, &e->render_objects); - - /* phase 2. force updates for restacks */ - for (i = 0; i < e->restack_objects.count; ++i) - { - 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); - - /* phase 3. add exposes */ - EINA_LIST_FREE(e->damages, r) - { - e->engine.func->output_redraws_rect_add(e->engine.data.output, - r->x, r->y, r->w, r->h); - eina_rectangle_free(r); - } - - /* phase 4. framespace, output & viewport changes */ - if (e->framespace.changed) - { - int fx, fy, fw, fh; - - fx = e->viewport.x - e->framespace.x; - fy = e->viewport.y - e->framespace.y; - fw = e->viewport.w + e->framespace.w; - fh = e->viewport.h + e->framespace.h; - e->engine.func->output_redraws_rect_add(e->engine.data.output, - fx, fy, fw, fh); - } - - if (e->viewport.changed) - { - e->engine.func->output_redraws_rect_add(e->engine.data.output, - 0, 0, - e->output.w, e->output.h); - } - if (e->output.changed) - { - e->engine.func->output_resize(e->engine.data.output, - e->output.w, e->output.h); - e->engine.func->output_redraws_rect_add(e->engine.data.output, - 0, 0, - e->output.w, e->output.h); - } - if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h)) - { - ERR("viewport size != output size!"); - } - if (redraw_all) - { - e->engine.func->output_redraws_rect_add(e->engine.data.output, - 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); - } - /* build obscure objects list of active objects that obscure */ - for (i = 0; i < e->active_objects.count; ++i) - { - 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) && - (!obj->clip.clipees) && - (obj->cur.visible) && - (!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); - } - - /* save this list */ - /* 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; - - 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; - - 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); - } - haveup = 1; - off_x = cx - ux; - off_y = cy - uy; - /* build obscuring objects list (in order from bottom to top) */ - if (alpha) - { - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - ux + off_x, uy + off_y, uw, uh); - } - for (i = 0; i < e->obscuring_objects.count; ++i) - { - 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 (alpha) - _evas_render_cutout_add(e, obj, off_x, off_y); - } - } - if (alpha) - { - 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.data.output, e->engine.data.context); - 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.data.context); - } - /* render all object that intersect with rect */ - for (i = 0; i < e->active_objects.count; ++i) - { - obj = eina_array_data_get(&e->active_objects, i); - - /* 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) || - (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; - - 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 (!obj->smart.smart) - { - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.cache.clip.x + off_x, - obj->cur.cache.clip.y + off_y, - obj->cur.cache.clip.w, - 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 + 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_clip_set(e->engine.data.output, - e->engine.data.context, - x, y, w, h); -#if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ - for (j = offset; j < e->temporary_objects.count; ++j) - { - Evas_Object *obj2; - - obj2 = (Evas_Object *)eina_array_data_get - (&e->temporary_objects, j); - _evas_render_cutout_add(e, obj2, off_x, off_y); - } -#endif - clean_them |= evas_render_mapped(e, obj, e->engine.data.context, - surface, off_x, off_y, 0, - cx, cy, cw, ch -#ifdef REND_DGB - , 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); - RD(" ---]\n"); - } - /* flush redraws */ - if (haveup) - { - evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL); - e->engine.func->output_flush(e->engine.data.output); - evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); - } - } - /* clear redraws */ - e->engine.func->output_redraws_clear(e->engine.data.output); - /* and do a post render pass */ - for (i = 0; i < e->active_objects.count; ++i) - { - 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)) - { - RD(" OBJ [%p] post... func1\n", obj); - obj->func->render_post(obj); - obj->restack = 0; - obj->changed = 0; - obj->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - obj->changed_map = 0; - obj->changed_pchange = 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->changed_move_only = 0; - obj->changed_nomove = 0; - obj->changed_move = 0; - obj->changed_map = 0; - obj->changed_pchange = 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++; - */ - } - /* free our obscuring object list */ - eina_array_clean(&e->obscuring_objects); - - /* If some object are still marked as changed, do not remove - them from the pending list. */ - eina_array_remove(&e->pending_objects, pending_change, NULL); - - for (i = 0; i < e->render_objects.count; ++i) - { - 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) - { - obj = eina_array_data_get(&e->delete_objects, i); - evas_object_free(obj, 1); - } - eina_array_clean(&e->delete_objects); - - e->changed = 0; - e->viewport.changed = 0; - e->output.changed = 0; - e->framespace.changed = 0; - e->invalidate = 0; - - // always clean... lots of mem waste! - /* 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->obscuring_objects); - eina_array_clean(&e->temporary_objects); - eina_array_clean(&e->clip_changes); -/* we should flush here and have a mempool system for this - eina_array_flush(&e->active_objects); - eina_array_flush(&e->render_objects); - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->delete_objects); - eina_array_flush(&e->obscuring_objects); - eina_array_flush(&e->temporary_objects); - eina_array_flush(&e->clip_changes); - */ - e->invalidate = 1; - } - - evas_module_clean(); - - evas_event_callback_call(e, EVAS_CALLBACK_RENDER_POST, NULL); - - RD("---]\n"); - - return updates; -} - -EAPI void -evas_render_updates_free(Eina_List *updates) -{ - Eina_Rectangle *r; - - EINA_LIST_FREE(updates, r) - eina_rectangle_free(r); -} - -EAPI Eina_List * -evas_render_updates(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_flush_ready (); -#endif - - if (!e->changed) return NULL; - return evas_render_updates_internal(e, 1, 1); -} - -EAPI void -evas_render(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - -#ifdef EVAS_FRAME_QUEUING - evas_common_frameq_flush_ready (); -#endif - - if (!e->changed) return; - evas_render_updates_internal(e, 0, 1); -} - -EAPI void -evas_norender(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - // if (!e->changed) return; - evas_render_updates_internal(e, 0, 0); -} - -EAPI void -evas_render_idle_flush(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - evas_fonts_zero_presure(e); - - if ((e->engine.func) && (e->engine.func->output_idle_flush) && - (e->engine.data.output)) - e->engine.func->output_idle_flush(e->engine.data.output); - - eina_array_flush(&e->active_objects); - eina_array_flush(&e->render_objects); - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->delete_objects); - eina_array_flush(&e->obscuring_objects); - eina_array_flush(&e->temporary_objects); - eina_array_flush(&e->clip_changes); - eina_array_flush(&e->temporary_objects); - - e->invalidate = 1; -} - -EAPI void -evas_sync(Evas *e) -{ -#ifdef EVAS_FRAME_QUEUING - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - evas_common_frameq_flush(); -#else - (void) e; -#endif -} - -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->cur.map->surface = NULL; - } - - if (obj->smart.smart) - { - Evas_Object *obj2; - - EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) - _evas_render_dump_map_surfaces(obj2); - } -} - -EAPI void -evas_render_dump(Evas *e) -{ - Evas_Layer *lay; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - EINA_INLIST_FOREACH(e->layers, lay) - { - Evas_Object *obj; - - EINA_INLIST_FOREACH(lay->objects, obj) - { - if ((obj->type) && (!strcmp(obj->type, "image"))) - evas_object_inform_call_image_unloaded(obj); - _evas_render_dump_map_surfaces(obj); - } - } - if ((e->engine.func) && (e->engine.func->output_dump) && - (e->engine.data.output)) - e->engine.func->output_dump(e->engine.data.output); -} - -void -evas_render_invalidate(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return; - MAGIC_CHECK_END(); - - eina_array_clean(&e->active_objects); - eina_array_clean(&e->render_objects); - - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->delete_objects); - - e->invalidate = 1; -} - -void -evas_render_object_recalc(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - -#ifndef EVAS_FRAME_QUEUING - if ((!obj->changed) && (obj->delete_me < 2)) -#else - if ((!obj->changed)) -#endif - { - Evas *e; - - 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; -#endif - 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 :*/ diff --git a/libraries/evas/src/lib/canvas/evas_smart.c b/libraries/evas/src/lib/canvas/evas_smart.c deleted file mode 100644 index 0cfba05..0000000 --- a/libraries/evas/src/lib/canvas/evas_smart.c +++ /dev/null @@ -1,266 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - - -static void _evas_smart_class_callbacks_create(Evas_Smart *s); - -/* all public */ - -EAPI void -evas_smart_free(Evas_Smart *s) -{ - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - return; - MAGIC_CHECK_END(); - s->delete_me = 1; - if (s->usage > 0) return; - if (s->class_allocated) free((void *)s->smart_class); - free(s->callbacks.array); - free(s); -} - -EAPI Evas_Smart * -evas_smart_class_new(const Evas_Smart_Class *sc) -{ - Evas_Smart *s; - - if (!sc) return NULL; - - /* api does not match abi! for now refuse as we only have 1 version */ - if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL; - - s = evas_mem_calloc(sizeof(Evas_Smart)); - if (!s) return NULL; - - s->magic = MAGIC_SMART; - - s->smart_class = sc; - _evas_smart_class_callbacks_create(s); - - return s; -} - -EAPI const Evas_Smart_Class * -evas_smart_class_get(const Evas_Smart *s) -{ - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - return NULL; - MAGIC_CHECK_END(); - return s->smart_class; -} - -EAPI void * -evas_smart_data_get(const Evas_Smart *s) -{ - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - return NULL; - MAGIC_CHECK_END(); - return (void *)s->smart_class->data; -} - -EAPI const Evas_Smart_Cb_Description ** -evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) -{ - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - if (count) *count = 0; - return NULL; - MAGIC_CHECK_END(); - - if (count) *count = s->callbacks.size; - return s->callbacks.array; -} - -EAPI const Evas_Smart_Cb_Description * -evas_smart_callback_description_find(const Evas_Smart *s, const char *name) -{ - if (!name) return NULL; - MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); - return NULL; - MAGIC_CHECK_END(); - return evas_smart_cb_description_find(&s->callbacks, name); -} - -EAPI Eina_Bool -evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) -{ - unsigned int off; - - /* api does not match abi! for now refuse as we only have 1 version */ - if (parent_sc->version != EVAS_SMART_CLASS_VERSION) return EINA_FALSE; - -#define _CP(m) sc->m = parent_sc->m - _CP(add); - _CP(del); - _CP(move); - _CP(resize); - _CP(show); - _CP(hide); - _CP(color_set); - _CP(clip_set); - _CP(clip_unset); - _CP(calculate); - _CP(member_add); - _CP(member_del); -#undef _CP - - sc->parent = parent_sc; - - off = sizeof(Evas_Smart_Class); - if (parent_sc_size == off) return EINA_TRUE; - - memcpy(((char *)sc) + off, ((char *)parent_sc) + off, parent_sc_size - off); - return EINA_TRUE; -} - -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 -evas_object_smart_use(Evas_Smart *s) -{ - s->usage++; -} - -void -evas_object_smart_unuse(Evas_Smart *s) -{ - s->usage--; - if ((s->usage <= 0) && (s->delete_me)) evas_smart_free(s); -} - -Eina_Bool -evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) -{ - void *tmp; - - if (size == a->size) - return EINA_TRUE; - - if (size == EINA_FALSE) - { - free(a->array); - a->array = NULL; - a->size = 0; - return EINA_TRUE; - } - - tmp = realloc(a->array, (size + 1) * sizeof(Evas_Smart_Cb_Description *)); - if (tmp) - { - a->array = tmp; - a->size = size; - a->array[size] = NULL; - return EINA_TRUE; - } - else - { - ERR("realloc failed!"); - return EINA_FALSE; - } -} - -static int -_evas_smart_cb_description_cmp_sort(const void *p1, const void *p2) -{ - const Evas_Smart_Cb_Description **a = (const Evas_Smart_Cb_Description **)p1; - const Evas_Smart_Cb_Description **b = (const Evas_Smart_Cb_Description **)p2; - return strcmp((*a)->name, (*b)->name); -} - -void -evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) -{ - unsigned int i, j; - - if (!a) - { - ERR("no array to fix!"); - return; - } - - qsort(a->array, a->size, sizeof(Evas_Smart_Cb_Description *), - _evas_smart_cb_description_cmp_sort); - - DBG("%u callbacks", a->size); - if (a->size) - DBG("%s [type=%s]", a->array[0]->name, a->array[0]->type); - - 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); - } - } - - evas_smart_cb_descriptions_resize(a, i + 1); -} - -static void -_evas_smart_class_callbacks_create(Evas_Smart *s) -{ - const Evas_Smart_Class *sc; - unsigned int n = 0; - - for (sc = s->smart_class; sc; sc = sc->parent) - { - 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; - } - evas_smart_cb_descriptions_fix(&s->callbacks); -} - -static int -_evas_smart_cb_description_cmp_search(const void *p1, const void *p2) -{ - const char *name = p1; - const Evas_Smart_Cb_Description **v = (const Evas_Smart_Cb_Description **)p2; - /* speed up string shares searches (same pointers) */ - if (name == (*v)->name) return 0; - return strcmp(name, (*v)->name); -} - -const Evas_Smart_Cb_Description * -evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) -{ - if (!a->array) return NULL; - return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *), - _evas_smart_cb_description_cmp_search); -} diff --git a/libraries/evas/src/lib/canvas/evas_stack.c b/libraries/evas/src/lib/canvas/evas_stack.c deleted file mode 100644 index a8dec0d..0000000 --- a/libraries/evas/src/lib/canvas/evas_stack.c +++ /dev/null @@ -1,391 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -static Evas_Object * -evas_object_above_get_internal(const Evas_Object *obj) -{ - if ((EINA_INLIST_GET(obj))->next) - return (Evas_Object *)((EINA_INLIST_GET(obj))->next); - else - { - if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next) - { - Evas_Layer *l; - - l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next); - return l->objects; - } - } - return NULL; -} - -static Evas_Object * -evas_object_below_get_internal(const Evas_Object *obj) -{ - if ((EINA_INLIST_GET(obj))->prev) - return (Evas_Object *)((EINA_INLIST_GET(obj))->prev); - else - { - if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev) - { - Evas_Layer *l; - - l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev); - return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last); - } - } - return NULL; -} - -EAPI void -evas_object_raise(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (evas_object_intercept_call_raise(obj)) return; - if (!((EINA_INLIST_GET(obj))->next)) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->smart.parent) - evas_object_smart_member_raise(obj); - else - { - if (obj->in_layer) - obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); - } - if (obj->clip.clipees) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->layer) evas_render_invalidate(obj->layer->evas); - obj->restack = EINA_TRUE; - evas_object_change(obj); - evas_object_inform_call_restack(obj); - if (obj->layer->evas->events_frozen > 0) return; - if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_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) && 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); - } - } -} - -EAPI void -evas_object_lower(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (evas_object_intercept_call_lower(obj)) return; - if (!((EINA_INLIST_GET(obj))->prev)) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->smart.parent) - evas_object_smart_member_lower(obj); - else - { - if (obj->in_layer) - obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects), - EINA_INLIST_GET(obj)); - } - if (obj->clip.clipees) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->layer) evas_render_invalidate(obj->layer->evas); - obj->restack = EINA_TRUE; - evas_object_change(obj); - evas_object_inform_call_restack(obj); - if (obj->layer->evas->events_frozen > 0) return; - if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_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) && 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); - } - } -} - -EAPI void -evas_object_stack_above(Evas_Object *obj, Evas_Object *above) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - MAGIC_CHECK(above, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj == above) return; - if (evas_object_intercept_call_stack_above(obj, above)) return; - if (!above) - { - evas_object_raise(obj); - return; - } - if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->smart.parent) - { - if (obj->smart.parent != above->smart.parent) - { - ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above); - return; - } - evas_object_smart_member_stack_above(obj, above); - } - else - { - if (above->smart.parent) - { - ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above); - return; - } - if (obj->layer != above->layer) - { - ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above); - return; - } - if (obj->in_layer) - { - obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), - EINA_INLIST_GET(obj)); - obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects), - EINA_INLIST_GET(obj), - EINA_INLIST_GET(above)); - } - } - if (obj->clip.clipees) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->layer) evas_render_invalidate(obj->layer->evas); - obj->restack = EINA_TRUE; - evas_object_change(obj); - evas_object_inform_call_restack(obj); - if (obj->layer->evas->events_frozen > 0) return; - if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_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) && 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); - } - } -} - -EAPI void -evas_object_stack_below(Evas_Object *obj, Evas_Object *below) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - MAGIC_CHECK(below, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj == below) return; - if (evas_object_intercept_call_stack_below(obj, below)) return; - if (!below) - { - evas_object_lower(obj); - return; - } - if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->smart.parent) - { - if (obj->smart.parent != below->smart.parent) - { - ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below); - return; - } - evas_object_smart_member_stack_below(obj, below); - } - else - { - if (below->smart.parent) - { - ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below); - return; - } - if (obj->layer != below->layer) - { - ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below); - return; - } - if (obj->in_layer) - { - obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), - EINA_INLIST_GET(obj)); - obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects), - EINA_INLIST_GET(obj), - EINA_INLIST_GET(below)); - } - } - if (obj->clip.clipees) - { - evas_object_inform_call_restack(obj); - return; - } - if (obj->layer) evas_render_invalidate(obj->layer->evas); - obj->restack = EINA_TRUE; - evas_object_change(obj); - evas_object_inform_call_restack(obj); - if (obj->layer->evas->events_frozen > 0) return; - if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_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) && 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); - } - } -} - -EAPI Evas_Object * -evas_object_above_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (obj->smart.parent) - { - do - { - obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next); - if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; - } - while (obj); - return NULL; - } - obj = evas_object_above_get_internal(obj); - while (obj) - { - if (!obj->delete_me) return (Evas_Object *)obj; - obj = evas_object_above_get_internal(obj); - } - return NULL; -} - -EAPI Evas_Object * -evas_object_below_get(const Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return NULL; - MAGIC_CHECK_END(); - if (obj->smart.parent) - { - do - { - obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev); - if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; - } - while (obj); - return NULL; - } - obj = evas_object_below_get_internal(obj); - while (obj) - { - if (!obj->delete_me) return (Evas_Object *)obj; - obj = evas_object_below_get_internal(obj); - } - return NULL; -} - - - -EAPI Evas_Object * -evas_object_bottom_get(const Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - if (e->layers) - { - Evas_Object *obj; - - obj = e->layers->objects; - while (obj) - { - if (!obj->delete_me) return obj; - obj = evas_object_above_get_internal(obj); - } - } - return NULL; -} - -EAPI Evas_Object * -evas_object_top_get(const Evas *e) -{ - Evas_Object *obj = NULL; - Eina_Inlist *list; - Evas_Layer *layer; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return NULL; - MAGIC_CHECK_END(); - - list = EINA_INLIST_GET(e->layers); - if (!list) return NULL; - - layer = (Evas_Layer *) list->last; - if (!layer) return NULL; - - list = EINA_INLIST_GET(layer->objects); - if (!list) return NULL; - - obj = (Evas_Object *) list->last; - if (!obj) return NULL; - - while (obj) - { - if (!obj->delete_me) return obj; - obj = evas_object_below_get_internal(obj); - } - - return obj; -} diff --git a/libraries/evas/src/lib/canvas/evas_stats.c b/libraries/evas/src/lib/canvas/evas_stats.c deleted file mode 100644 index cfb1a84..0000000 --- a/libraries/evas/src/lib/canvas/evas_stats.c +++ /dev/null @@ -1,185 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" -#include "evas_cs.h" - -EAPI Eina_Bool -evas_cserve_want_get(void) -{ -#ifdef EVAS_CSERVE - return evas_cserve_use_get(); -#endif - return 0; -} - -EAPI Eina_Bool -evas_cserve_connected_get(void) -{ -#ifdef EVAS_CSERVE - return evas_cserve_have_get(); -#endif - return 0; -} - -EAPI Eina_Bool -evas_cserve_stats_get(Evas_Cserve_Stats *stats) -{ -#ifdef EVAS_CSERVE - Op_Getstats_Reply st; - - if (!evas_cserve_raw_stats_get(&st)) return 0; - if (!stats) return 1; - stats->saved_memory = st.saved_memory; - stats->wasted_memory = st.wasted_memory; - stats->saved_memory_peak = st.saved_memory_peak; - stats->wasted_memory_peak = st.wasted_memory_peak; - stats->saved_time_image_header_load = st.saved_time_image_header_load; - stats->saved_time_image_data_load = st.saved_time_image_data_load; - // may expand this in future - return 1; -#else - (void) stats; - return 0; -#endif -} - -EAPI Eina_Bool -evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache) -{ -#ifdef EVAS_CSERVE - Op_Getinfo_Reply *info; - unsigned char *p; - int i, j; - - if (!(info = evas_cserve_raw_info_get())) return 0; - if (!cache) - { - free(info); - return 1; - } - cache->active.mem_total = info->active.mem_total; - cache->active.count = info->active.count; - cache->cached.mem_total = info->cached.mem_total; - cache->cached.count = info->cached.count; - cache->images = NULL; - j = info->active.count + info->cached.count; - p = (unsigned char *)info; - p += sizeof(Op_Getinfo_Reply); - for (i = 0; i < j; i++) - { - Evas_Cserve_Image *im; - Op_Getinfo_Item it; - char *file, *key; - - memcpy(&it, p, sizeof(Op_Getinfo_Item)); - file = (char*) (p + sizeof(Op_Getinfo_Item)); - key = file + strlen(file) + 1; - im = calloc(1, sizeof(Evas_Cserve_Image)); - if (!im) continue; - if (file[0] != 0) - { - file = (char *)eina_stringshare_add(file); - if (!file) - { - free(im); - continue; - } - } - else - file = NULL; - if (key[0] != 0) - { - key = (char *)eina_stringshare_add(key); - if (!key) - { - if (file) eina_stringshare_del(file); - free(im); - continue; - } - } - else key = NULL; - cache->images = eina_list_append(cache->images, im); - im->file = file; - im->key = key; - im->w = it.w; - im->h = it.h; - im->cached_time = it.cached_time; - im->file_mod_time = it.file_mod_time; - im->file_checked_time = it.file_checked_time; - im->refcount = it.refcount; - im->data_refcount = it.data_refcount; - im->memory_footprint = it.memory_footprint; - im->head_load_time = it.head_load_time; - im->data_load_time = it.data_load_time; - im->active = it.active; - im->alpha = it.alpha; - im->data_loaded = it.data_loaded; - im->dead = it.dead; - im->useless = it.useless; - } - free(info); - return 1; -#else - (void) cache; - return 0; -#endif -} - -EAPI void -evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache) -{ -#ifdef EVAS_CSERVE - Evas_Cserve_Image *im; - - EINA_LIST_FREE(cache->images, im) - { - if (im->file) eina_stringshare_del(im->file); - if (im->key) eina_stringshare_del(im->key); - free(im); - } -#else - (void) cache; -#endif -} - -EAPI Eina_Bool -evas_cserve_config_get(Evas_Cserve_Config *config) -{ -#ifdef EVAS_CSERVE - Op_Getconfig_Reply conf; - - if (!evas_cserve_raw_config_get(&conf)) return 0; - if (!config) return 1; - config->cache_max_usage = conf.cache_max_usage; - config->cache_item_timeout = conf.cache_item_timeout; - config->cache_item_timeout_check = conf.cache_item_timeout_check; - return 1; -#else - (void) config; - return 0; -#endif -} - -EAPI Eina_Bool -evas_cserve_config_set(const Evas_Cserve_Config *config) -{ -#ifdef EVAS_CSERVE - Op_Setconfig conf; - - if (!config) return 1; - conf.cache_max_usage = config->cache_max_usage; - conf.cache_item_timeout = config->cache_item_timeout; - conf.cache_item_timeout_check = config->cache_item_timeout_check; - return evas_cserve_raw_config_set(&conf); -#else - (void) config; - return 0; -#endif -} - -EAPI void -evas_cserve_disconnect(void) -{ -#ifdef EVAS_CSERVE - evas_cserve_discon(); -#endif -} diff --git a/libraries/evas/src/lib/canvas/evas_touch_point.c b/libraries/evas/src/lib/canvas/evas_touch_point.c deleted file mode 100644 index bdea73f..0000000 --- a/libraries/evas/src/lib/canvas/evas_touch_point.c +++ /dev/null @@ -1,110 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -void -_evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y) -{ - Evas_Coord_Touch_Point *point; - - /* create new Evas_Coord_Touch_Point */ - point = (Evas_Coord_Touch_Point *)calloc(1, sizeof(Evas_Coord_Touch_Point)); - point->x = x; - point->y = y; - point->id = id; - point->state = EVAS_TOUCH_POINT_DOWN; - e->touch_points = eina_list_append(e->touch_points, point); -} - -void -_evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state) -{ - Eina_List *l; - Evas_Coord_Touch_Point *point = NULL; - - EINA_LIST_FOREACH(e->touch_points, l, point) - { - if (point->id == id) - { - point->x = x; - point->y = y; - point->state = state; - break; - } - } -} - -void -_evas_touch_point_remove(Evas *e, int id) -{ - Eina_List *l; - Evas_Coord_Touch_Point *point = NULL; - - EINA_LIST_FOREACH(e->touch_points, l, point) - { - if (point->id == id) - { - e->touch_points = eina_list_remove(e->touch_points, point); - free(point); - break; - } - } -} - -EAPI unsigned int -evas_touch_point_list_count(Evas *e) -{ - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return 0; - MAGIC_CHECK_END(); - return eina_list_count(e->touch_points); -} - -EAPI void -evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) -{ - Evas_Coord_Touch_Point *point = NULL; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - if (x) *x = 0; - if (y) *y = 0; - return; - MAGIC_CHECK_END(); - - point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); - if (!point) - { - if (x) *x = 0; - if (y) *y = 0; - return; - } - if (x) *x = point->x; - if (y) *y = point->y; -} - -EAPI int -evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) -{ - Evas_Coord_Touch_Point *point = NULL; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return -1; - MAGIC_CHECK_END(); - - point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); - if (!point) return -1; - return point->id; -} - -EAPI Evas_Touch_Point_State -evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) -{ - Evas_Coord_Touch_Point *point = NULL; - - MAGIC_CHECK(e, Evas, MAGIC_EVAS); - return EVAS_TOUCH_POINT_CANCEL; - MAGIC_CHECK_END(); - - point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); - if (!point) return EVAS_TOUCH_POINT_CANCEL; - return point->state; -} diff --git a/libraries/evas/src/lib/cserve/Makefile.am b/libraries/evas/src/lib/cserve/Makefile.am deleted file mode 100644 index 6ff6e2a..0000000 --- a/libraries/evas/src/lib/cserve/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --I$(top_srcdir)/src/lib/cserve \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@FREETYPE_CFLAGS@ \ -@FRIBIDI_CFLAGS@ \ -@EET_CFLAGS@ \ -@FONTCONFIG_CFLAGS@ \ -@pthread_cflags@ \ -@PIXMAN_CFLAGS@ - -if EVAS_CSERVE - -noinst_LTLIBRARIES = libevas_cserve.la - -endif - -libevas_cserve_la_SOURCES = \ -evas_cs.h \ -evas_cs_main.c \ -evas_cs_server.c \ -evas_cs_client.c \ -evas_cs_mem.c - -libevas_cserve_la_LIBADD = @EINA_LIBS@ -lrt diff --git a/libraries/evas/src/lib/cserve/Makefile.in b/libraries/evas/src/lib/cserve/Makefile.in deleted file mode 100644 index caff4d6..0000000 --- a/libraries/evas/src/lib/cserve/Makefile.in +++ /dev/null @@ -1,692 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/cserve -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_cserve_la_DEPENDENCIES = -am_libevas_cserve_la_OBJECTS = evas_cs_main.lo evas_cs_server.lo \ - evas_cs_client.lo evas_cs_mem.lo -libevas_cserve_la_OBJECTS = $(am_libevas_cserve_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -@EVAS_CSERVE_TRUE@am_libevas_cserve_la_rpath = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_cserve_la_SOURCES) -DIST_SOURCES = $(libevas_cserve_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --I$(top_srcdir)/src/lib/cserve \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EINA_CFLAGS@ \ -@FREETYPE_CFLAGS@ \ -@FRIBIDI_CFLAGS@ \ -@EET_CFLAGS@ \ -@FONTCONFIG_CFLAGS@ \ -@pthread_cflags@ \ -@PIXMAN_CFLAGS@ - -@EVAS_CSERVE_TRUE@noinst_LTLIBRARIES = libevas_cserve.la -libevas_cserve_la_SOURCES = \ -evas_cs.h \ -evas_cs_main.c \ -evas_cs_server.c \ -evas_cs_client.c \ -evas_cs_mem.c - -libevas_cserve_la_LIBADD = @EINA_LIBS@ -lrt -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cserve/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/cserve/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_cserve.la: $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libevas_cserve_la_rpath) $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_client.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_mem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_server.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/cserve/evas_cs.h b/libraries/evas/src/lib/cserve/evas_cs.h deleted file mode 100644 index 73bbaed..0000000 --- a/libraries/evas/src/lib/cserve/evas_cs.h +++ /dev/null @@ -1,285 +0,0 @@ -#ifndef EVAS_CS_H -#define EVAS_CS_H 1 - -#ifdef EVAS_CSERVE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "evas_common.h" -#include "evas_private.h" - -#ifdef EAPI -# undef EAPI -#endif - -#ifdef _WIN32 -# ifdef EFL_EVAS_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif /* ! DLL_EXPORT */ -# else -# define EAPI __declspec(dllimport) -# endif /* ! EFL_EVAS_BUILD */ -#else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif -#endif /* ! _WIN32 */ - -#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path)) - -typedef struct _Server Server; -typedef struct _Client Client; -typedef struct _Mem Mem; - -struct _Server -{ - char *socket_path; - Eina_List *clients; - int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data); - void *data; - pid_t pid; - int server_id; - // for channel 2; - struct { - int fd; - int req_from, req_to; - } ch[2]; - void *main_handle; -}; - -struct _Client -{ - Server *server; - unsigned char *buf; - Client *client_main; - int bufsize, bufalloc; - int fd; - unsigned char *inbuf; - int inbufsize, inbufalloc; - unsigned char dead : 1; - void (*func) (void *fdata, Client *c); - void *data; - pid_t pid; - int req_from, req_to; - LK(lock); -}; - -struct _Mem -{ - unsigned char *data; - char *name; - int fd; - int id; - int offset; - int size; - int ref; - Eina_Bool write : 1; -}; - -//// for comms -enum -{ - OP_NOP, // 0 - - OP_INIT, // 1 - OP_LOAD, // 2 - OP_UNLOAD, // 3 - OP_LOADDATA, // 4 - OP_UNLOADDATA, // 5 - OP_USELESSDATA, // 6 - OP_PRELOAD, // 7 - OP_FORCEDUNLOAD, // 8 - - OP_GETCONFIG, // 9 - OP_SETCONFIG, // 10 - OP_GETSTATS, // 11 - OP_GETINFO, // 12 - - OP_INVALID // 13 -}; - -typedef struct -{ - pid_t pid; - int server_id; - void *handle; -} Op_Init; -typedef struct -{ - struct { - int scale_down_by; - double dpi; - int w, h; - struct { - int x, y, w, h; - } region; - Eina_Bool orientation; - } lopt; -} Op_Load; // +"file""key" -typedef struct -{ - void *handle; - int server_id; - struct { - int id; - int offset; - int size; - } mem; - struct { - int w, h; - Eina_Bool alpha : 1; - } image; -} Op_Load_Reply; -typedef struct -{ - void *handle; - int server_id; -} Op_Unload; -typedef struct -{ - void *handle; - int server_id; -} Op_Unloaddata; -typedef struct -{ - void *handle; - int server_id; -} Op_Loaddata; -typedef struct -{ - struct { - int id; - int offset; - int size; - } mem; -} Op_Loaddata_Reply; -typedef struct -{ - void *handle; - int server_id; -} Op_Preload; -typedef struct -{ - void *handle; - struct { - int id; - int offset; - int size; - } mem; -} Op_Preload_Reply; -typedef struct -{ - void *handle; - int server_id; -} Op_Forcedunload; -typedef struct -{ - int cache_max_usage; - int cache_item_timeout; - int cache_item_timeout_check; -} Op_Getconfig_Reply; -typedef struct -{ - int cache_max_usage; - int cache_item_timeout; - int cache_item_timeout_check; -} Op_Setconfig; -typedef struct -{ - int saved_memory; - int wasted_memory; - int saved_memory_peak; - int wasted_memory_peak; - double saved_time_image_header_load; - double saved_time_image_data_load; -} Op_Getstats_Reply; -typedef struct -{ - struct { - int mem_total; - int count; - } active, cached; -} Op_Getinfo_Reply; // + N active Info Items + N cached items -typedef struct -{ - int file_key_size; - int w, h; - time_t file_mod_time; - time_t file_checked_time; - time_t cached_time; - int refcount; - int data_refcount; - int memory_footprint; - double head_load_time; - double data_load_time; - Eina_Bool alpha : 1; - Eina_Bool data_loaded : 1; - Eina_Bool active : 1; - Eina_Bool dead : 1; - Eina_Bool useless : 1; -} Op_Getinfo_Item; // + "file""key" - - -// for clients to connect to cserve -EAPI Eina_Bool evas_cserve_init(void); -EAPI int evas_cserve_use_get(void); -EAPI Eina_Bool evas_cserve_have_get(void); -EAPI void evas_cserve_shutdown(void); -EAPI void evas_cserve_discon(void); -EAPI Eina_Bool evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt); -EAPI Eina_Bool evas_cserve_image_data_load(Image_Entry *ie); -EAPI void evas_cserve_image_unload(Image_Entry *ie); -EAPI void evas_cserve_image_useless(Image_Entry *ie); -EAPI void evas_cserve_image_free(Image_Entry *ie); -EAPI Eina_Bool evas_cserve_raw_config_get(Op_Getconfig_Reply *config); -EAPI Eina_Bool evas_cserve_raw_config_set(Op_Setconfig *config); -EAPI Eina_Bool evas_cserve_raw_stats_get(Op_Getstats_Reply *stats); -EAPI Op_Getinfo_Reply *evas_cserve_raw_info_get(void); - -// for the server -EAPI Server *evas_cserve_server_add(void); -EAPI void evas_cserve_server_del(Server *s); -EAPI void evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data); -EAPI void evas_cserve_server_message_handler_set(Server *s, int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data), void *data); -EAPI void evas_cserve_server_wait(Server *s, int timeout); - -//// for memory -// for server -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 do_write); -EAPI void evas_cserve_mem_close(Mem *m); - -// for both -EAPI Eina_Bool evas_cserve_mem_resize(Mem *m, int size); -EAPI void evas_cserve_mem_del(int pid, int id); - -#endif - -#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_client.c b/libraries/evas/src/lib/cserve/evas_cs_client.c deleted file mode 100644 index b24848d..0000000 --- a/libraries/evas/src/lib/cserve/evas_cs_client.c +++ /dev/null @@ -1,528 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include - -#include "evas_cs.h" - -#ifdef EVAS_CSERVE - -static Server *cserve = NULL; -static int csrve_init = 0; -static int connect_num = 0; -static int cserve_discon = 0; - -static void -pipe_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) -{ -} - -static void -pipe_handle(int push) -{ - static struct sigaction old_action; - struct sigaction action; - - if (push) - { - action.sa_handler = NULL; - action.sa_sigaction = pipe_handler; - action.sa_flags = SA_RESTART | SA_SIGINFO; - sigemptyset(&action.sa_mask); - sigaction(SIGPIPE, &action, &old_action); - } - else - { - sigaction(SIGPIPE, &old_action, &action); - } -} - -static Server * -server_connect(void) -{ - Server *s; - char buf[PATH_MAX]; - int curstate = 0; - struct sockaddr_un socket_unix; - int socket_unix_len; - - s = calloc(1, sizeof(Server)); - if (!s) return NULL; - s->ch[0].fd = -1; - s->ch[1].fd = -1; - snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid()); - s->socket_path = strdup(buf); - if (!s->socket_path) - { - free(s); - return NULL; - } - s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (s->ch[0].fd < 0) goto error; - if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; - if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) - goto error; - socket_unix.sun_family = AF_UNIX; - strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); - socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); - if (connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error; - - s->ch[1].fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (s->ch[1].fd < 0) goto error; - if (fcntl(s->ch[1].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; - if (setsockopt(s->ch[1].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) - goto error; - socket_unix.sun_family = AF_UNIX; - strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); - socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); - if (connect(s->ch[1].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error; - - return s; - error: - if (s->ch[0].fd >= 0) close(s->ch[0].fd); - if (s->ch[1].fd >= 0) close(s->ch[1].fd); - free(s->socket_path); - free(s); - return NULL; -} - -static void -server_disconnect(Server *s) -{ - close(s->ch[0].fd); - close(s->ch[1].fd); - free(s->socket_path); - free(s); -} - -static int -server_send(Server *s, int channel, int opcode, int size, unsigned char *data) -{ - int ints[3]; - int num; - - pipe_handle(1); - ints[0] = size; - ints[1] = opcode; - s->ch[channel].req_to++; - ints[2] = s->ch[channel].req_to; - num = write(s->ch[channel].fd, ints, (sizeof(int) * 3)); - if (num < 0) - { - pipe_handle(0); - if (cserve) server_disconnect(cserve); - cserve = NULL; - return 0; - } - num = write(s->ch[channel].fd, data, size); - if (num < 0) - { - pipe_handle(0); - if (cserve) server_disconnect(cserve); - cserve = NULL; - return 0; - } - pipe_handle(0); - return 1; -} - -static unsigned char * -server_read(Server *s, int channel, int *opcode, int *size) -{ - int ints[3], num, left; - unsigned char *data; - - num = read(s->ch[channel].fd, ints, sizeof(int) * 3); - if (num != (sizeof(int) * 3)) - { - if (cserve) server_disconnect(cserve); - cserve = NULL; - return NULL; - } - *size = ints[0]; - *opcode = ints[1]; - if ((*size < 0) || (*size > (1024 * 1024))) return NULL; - if (ints[2] != (s->ch[channel].req_from + 1)) - { - ERR("EEK! sequence number mismatch from serer with pid: %i. " - "---- num %i is not 1 more than %i" - , - s->pid, ints[2], s->ch[channel].req_from); - return NULL; - } - s->ch[channel].req_from++; - data = malloc(*size); - if (!data) return NULL; - num = read(s->ch[channel].fd, data, *size); - if (num < 0) - { - free(data); - return NULL; - } - left = *size - num; - while (left > 0) - { - num = read(s->ch[channel].fd, data + (*size - left), left); - if (num < 0) - { - free(data); - return NULL; - } - left -= num; - } - return data; -} - -static int -server_init(Server *s) -{ - Op_Init msg, *rep; - int opcode; - int size; - - msg.pid = getpid(); - msg.server_id = 0; - msg.handle = NULL; - if (!server_send(s, 0, OP_INIT, sizeof(msg), (unsigned char *)(&msg))) - return 0; - rep = (Op_Init *)server_read(s, 0, &opcode, &size); - if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init))) - { - s->pid = rep->pid; - s->server_id = rep->server_id; - s->main_handle = rep->handle; - connect_num++; - msg.pid = getpid(); - msg.server_id = 1; - msg.handle = rep->handle; - free(rep); - if (!server_send(s, 1, OP_INIT, sizeof(msg), (unsigned char *)(&msg))) - return 0; - rep = (Op_Init *)server_read(s, 1, &opcode, &size); - if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init))) - { - free(rep); - return 1; - } - if (rep) free(rep); - return 0; - } - if (rep) free(rep); - return 0; -} - -EAPI Eina_Bool -evas_cserve_init(void) -{ - csrve_init++; - if (cserve) return 1; - cserve = server_connect(); - if (!cserve) return 0; - if (!server_init(cserve)) - { - if (cserve) server_disconnect(cserve); - cserve = NULL; - return 0; - } - return 1; -} - -EAPI int -evas_cserve_use_get(void) -{ - return csrve_init; -} - -EAPI Eina_Bool -evas_cserve_have_get(void) -{ - if (cserve) return 1; - return 0; -} - -EAPI void -evas_cserve_shutdown(void) -{ - csrve_init--; - if (csrve_init > 0) return; - if (!cserve) return; - server_disconnect(cserve); - cserve = NULL; -} - -EAPI void -evas_cserve_discon(void) -{ - if (cserve) - { - server_disconnect(cserve); - cserve = NULL; - cserve_discon = 1; - } -} - -static void -server_reinit(void) -{ - if (cserve) return; - if (cserve_discon) return; - cserve = server_connect(); - if (cserve) - { - if (!server_init(cserve)) - { - if (cserve) server_disconnect(cserve); - cserve = NULL; - } - } -} - -EAPI Eina_Bool -evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt) -{ - Op_Load msg; - Op_Load_Reply *rep; - unsigned char *buf; - char fbuf[PATH_MAX], wdb[PATH_MAX]; - int flen, klen; - int opcode; - int size; - - if (csrve_init > 0) server_reinit(); - else return 0; - if (!cserve) return 0; - if (!key) key = ""; - memset(&msg, 0, sizeof(msg)); - msg.lopt.scale_down_by = lopt->scale_down_by; - msg.lopt.dpi = lopt->dpi; - msg.lopt.w = lopt->w; - msg.lopt.h = lopt->h; - msg.lopt.region.x = lopt->region.x; - 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))) - { - snprintf(fbuf, sizeof(buf), "%s/%s", wdb, file); - file = fbuf; - } - } - if (!realpath(file, wdb)) file = wdb; - flen = strlen(file) + 1; - klen = strlen(key) + 1; - buf = malloc(sizeof(msg) + flen + klen); - if (!buf) return 0; - memcpy(buf, &msg, sizeof(msg)); - memcpy(buf + sizeof(msg), file, flen); - memcpy(buf + sizeof(msg) + flen, key, klen); - if (!server_send(cserve, ie->channel, OP_LOAD, - sizeof(msg) + flen + klen, - buf)) - { - free(buf); - return 0; - } - free(buf); - if (!cserve) return 0; - rep = (Op_Load_Reply *)server_read(cserve, ie->channel, &opcode, &size); - if ((rep) && (opcode == OP_LOAD) && (size == sizeof(Op_Load_Reply))) - { - ie->w = rep->image.w; - ie->h = rep->image.h; - ie->flags.alpha = rep->image.alpha; - ie->data1 = rep->handle; - } - if (rep) free(rep); - if (!ie->data1) return 0; - ie->connect_num = connect_num; - if (cserve) - ie->server_id = cserve->server_id; - return 1; -} - -EAPI Eina_Bool -evas_cserve_image_data_load(Image_Entry *ie) -{ - Op_Loaddata msg; - Op_Loaddata_Reply *rep; - int opcode; - int size; - if (csrve_init > 0) server_reinit(); - else return 0; - if (!cserve) return 0; - if (!ie->data1) return 0; - if (cserve->server_id != ie->server_id) - { - ie->data1 = NULL; - if (!evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts))) - return 0; - } - if (ie->connect_num != connect_num) return 0; - memset(&msg, 0, sizeof(msg)); - msg.handle = ie->data1; - msg.server_id = cserve->server_id; - if (!server_send(cserve, ie->channel, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg))) - return 0; - if (!cserve) return 0; - rep = (Op_Loaddata_Reply *)server_read(cserve, ie->channel, &opcode, &size); - if ((rep) && (opcode == OP_LOADDATA) && (size == sizeof(Op_Loaddata_Reply))) - { - if (rep->mem.size <= 0) - { - free(rep); - return 0; - } - ie->data2 = evas_cserve_mem_open(cserve->pid, rep->mem.id, NULL, rep->mem.size, 0); - free(rep); - return 1; - } - if (rep) free(rep); - return 0; -} - -EAPI void -evas_cserve_image_free(Image_Entry *ie) -{ - Op_Unload msg; - - if (csrve_init > 0) server_reinit(); - else return; - if (!cserve) return; - if (!ie->data1) return; - memset(&msg, 0, sizeof(msg)); - msg.handle = ie->data1; - msg.server_id = cserve->server_id; - if (ie->data2) evas_cserve_image_unload(ie); - if (cserve) - { - if (ie->connect_num == connect_num) - { - if (ie->server_id == cserve->server_id) - server_send(cserve, ie->channel, OP_UNLOAD, sizeof(msg), (unsigned char *)(&msg)); - } - } - ie->data1 = NULL; - ie->data2 = NULL; -} - -EAPI void -evas_cserve_image_unload(Image_Entry *ie) -{ - Op_Unloaddata msg; - - if (csrve_init > 0) server_reinit(); - else return; - if (!cserve) return; - if (!ie->data1) return; - if (ie->connect_num != connect_num) return; - memset(&msg, 0, sizeof(msg)); - msg.handle = ie->data1; - msg.server_id = cserve->server_id; - if (ie->data2) evas_cserve_mem_close(ie->data2); - ie->data2 = NULL; - if (ie->connect_num == connect_num) - { - if (ie->server_id == cserve->server_id) - server_send(cserve, ie->channel, OP_UNLOADDATA, sizeof(msg), (unsigned char *)(&msg)); - } -} - -EAPI void -evas_cserve_image_useless(Image_Entry *ie) -{ - Op_Unloaddata msg; - - if (csrve_init > 0) server_reinit(); - else return; - if (!cserve) return; - if (!ie->data1) return; - if (ie->connect_num != connect_num) return; - memset(&msg, 0, sizeof(msg)); - msg.handle = ie->data1; - msg.server_id = cserve->server_id; - if (ie->data2) evas_cserve_mem_close(ie->data2); - ie->data2 = NULL; - if (ie->connect_num == connect_num) - { - if (ie->server_id == cserve->server_id) - server_send(cserve, ie->channel, OP_USELESSDATA, sizeof(msg), (unsigned char *)(&msg)); - } -} - -EAPI Eina_Bool -evas_cserve_raw_config_get(Op_Getconfig_Reply *config) -{ - Op_Getconfig_Reply *rep; - int opcode; - int size; - if (csrve_init > 0) server_reinit(); - else return 0; - if (!cserve) return 0; - if (!server_send(cserve, 0, OP_GETCONFIG, 0, NULL)) return 0; - rep = (Op_Getconfig_Reply *)server_read(cserve, 0, &opcode, &size); - if ((rep) && (opcode == OP_GETCONFIG) && (size == sizeof(Op_Getconfig_Reply))) - { - memcpy(config, rep, sizeof(Op_Getconfig_Reply)); - free(rep); - return 1; - } - if (rep) free(rep); - return 0; -} - -EAPI Eina_Bool -evas_cserve_raw_config_set(Op_Setconfig *config) -{ - if (csrve_init > 0) server_reinit(); - else return 0; - if (!cserve) return 0; - if (!server_send(cserve, 0, OP_SETCONFIG, sizeof(Op_Setconfig), (unsigned char *)config)) return 0; - return 1; -} - -EAPI Eina_Bool -evas_cserve_raw_stats_get(Op_Getstats_Reply *stats) -{ - Op_Getstats_Reply *rep; - int opcode; - int size; - if (csrve_init > 0) server_reinit(); - else return 0; - if (!cserve) return 0; - if (!server_send(cserve, 0, OP_GETSTATS, 0, NULL)) return 0; - rep = (Op_Getstats_Reply *)server_read(cserve, 0, &opcode, &size); - if ((rep) && (opcode == OP_GETSTATS) && (size == sizeof(Op_Getstats_Reply))) - { - memcpy(stats, rep, sizeof(Op_Getstats_Reply)); - free(rep); - return 1; - } - if (rep) free(rep); - return 0; -} - -EAPI Op_Getinfo_Reply * -evas_cserve_raw_info_get(void) -{ - Op_Getinfo_Reply *rep; - int opcode; - int size; - if (csrve_init > 0) server_reinit(); - else return NULL; - if (!cserve) return NULL; - if (!server_send(cserve, 0, OP_GETINFO, 0, NULL)) return NULL; - rep = (Op_Getinfo_Reply *)server_read(cserve, 0, &opcode, &size); - if ((rep) && (opcode == OP_GETINFO) && - (size >= (int)sizeof(Op_Getinfo_Reply))) - { - return rep; - } - if (rep) free(rep); - return NULL; -} - -#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_main.c b/libraries/evas/src/lib/cserve/evas_cs_main.c deleted file mode 100644 index e8282aa..0000000 --- a/libraries/evas/src/lib/cserve/evas_cs_main.c +++ /dev/null @@ -1,9 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "evas_cs.h" - -#ifdef EVAS_CSERVE - -#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_mem.c b/libraries/evas/src/lib/cserve/evas_cs_mem.c deleted file mode 100644 index 15edf93..0000000 --- a/libraries/evas/src/lib/cserve/evas_cs_mem.c +++ /dev/null @@ -1,168 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "evas_cs.h" - -#ifdef EVAS_CSERVE - -EAPI Mem * -evas_cserve_mem_new(int size, const char *name) -{ - Mem *m; - static int id = 0; - char buf[PATH_MAX]; - - m = calloc(1, sizeof(Mem)); - if (!m) return NULL; - if (name) - snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name); - else - { - id++; - snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), getpid(), id); - } - m->id = id; - m->offset = 0; - m->name = strdup(buf); - if (!m->name) - { - free(m); - return NULL; - } - m->size = size; - m->fd = shm_open(m->name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); - if (m->fd < 0) - { - free(m->name); - free(m); - return NULL; - } - if (ftruncate(m->fd, m->size) < 0) - { - shm_unlink(m->name); - close(m->fd); - free(m->name); - free(m); - return NULL; - } - - eina_mmap_safety_enabled_set(EINA_TRUE); - - m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0); - if (m->data == MAP_FAILED) - { - shm_unlink(m->name); - close(m->fd); - free(m->name); - free(m); - return NULL; - } - m->ref = 1; - m->write = 1; - return m; -} - -EAPI void -evas_cserve_mem_free(Mem *m) -{ - shm_unlink(m->name); - munmap(m->data, m->size); - close(m->fd); - free(m->name); - free(m); -} - -EAPI Mem * -evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write) -{ - Mem *m; - char buf[PATH_MAX]; - - m = calloc(1, sizeof(Mem)); - if (!m) return NULL; - if (name) - snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name); - else - snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id); - m->name = strdup(buf); - if (!m->name) - { - free(m); - return NULL; - } - m->size = size; - 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); - if (m->fd < 0) - { - free(m->name); - free(m); - return NULL; - } - m->write = do_write; - - eina_mmap_safety_enabled_set(EINA_TRUE); - - 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); - if (m->data == MAP_FAILED) - { - close(m->fd); - free(m->name); - free(m); - return NULL; - } - m->ref = 1; - return m; -} - -EAPI void -evas_cserve_mem_close(Mem *m) -{ - munmap(m->data, m->size); - close(m->fd); - free(m->name); - free(m); -} - -EAPI Eina_Bool -evas_cserve_mem_resize(Mem *m, int size) -{ - if (m->size == size) return 1; - if (m->write) - { - if (ftruncate(m->fd, size) < 0) return 0; - munmap(m->data, m->size); - eina_mmap_safety_enabled_set(EINA_TRUE); - m->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0); - } - else - { - munmap(m->data, m->size); - eina_mmap_safety_enabled_set(EINA_TRUE); - m->data = mmap(NULL, size, PROT_READ, MAP_SHARED, m->fd, 0); - } - if (m->data == MAP_FAILED) - { - m->data = NULL; - return 0; - } - m->size = size; - return 1; -} - -EAPI void -evas_cserve_mem_del(int pid, int id) -{ - char buf[PATH_MAX]; - - snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id); - shm_unlink(buf); -} - -#endif diff --git a/libraries/evas/src/lib/cserve/evas_cs_server.c b/libraries/evas/src/lib/cserve/evas_cs_server.c deleted file mode 100644 index 3b5d8b9..0000000 --- a/libraries/evas/src/lib/cserve/evas_cs_server.c +++ /dev/null @@ -1,380 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "evas_cs.h" - -#ifdef EVAS_CSERVE - -EAPI Server * -evas_cserve_server_add(void) -{ - Server *s; - char buf[PATH_MAX]; - struct sockaddr_un socket_unix; - struct linger lin; - mode_t pmode; - int socket_unix_len; - - s = calloc(1, sizeof(Server)); - if (!s) return NULL; - s->ch[0].fd = -1; - snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid()); - s->socket_path = strdup(buf); - if (!s->socket_path) - { - free(s); - return NULL; - } - pmode = umask(~(S_IRUSR | S_IWUSR)); - start: - s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (s->ch[0].fd < 0) goto error; - if (fcntl(s->ch[0].fd, F_SETFL, O_NONBLOCK) < 0) goto error; - if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error; - lin.l_onoff = 1; - lin.l_linger = 0; - if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) < 0) - goto error; - socket_unix.sun_family = AF_UNIX; - strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path)); - socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); - if (bind(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) - { - if ((connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) && - (unlink(s->socket_path) >= 0)) - { - close(s->ch[0].fd); - goto start; - } - else - goto error; - } - if (listen(s->ch[0].fd, 4096) < 0) goto error; - umask(pmode); - return s; - error: - umask(pmode); - if (s->ch[0].fd >= 0) close(s->ch[0].fd); - free(s->socket_path); - free(s); - return NULL; -} - -EAPI void -evas_cserve_server_del(Server *s) -{ - Client *c; - - EINA_LIST_FREE(s->clients, c) - { - LKL(c->lock); - close(c->fd); - if (c->buf) free(c->buf); - if (c->inbuf) free(c->inbuf); - LKD(c->lock); - free(c); - } - close(s->ch[0].fd); - unlink(s->socket_path); - free(s->socket_path); - free(s); -} - -static void -server_accept(Server *s) -{ - Client *c; - int new_fd; - struct sockaddr_in incoming; - size_t size_in; - - size_in = sizeof(struct sockaddr_in); - new_fd = accept(s->ch[0].fd, (struct sockaddr *)&incoming, (socklen_t *)&size_in); - if (new_fd < 0) return; - fcntl(new_fd, F_SETFL, O_NONBLOCK); - fcntl(new_fd, F_SETFD, FD_CLOEXEC); - c = calloc(1, sizeof(Client)); - if (!c) - { - close(new_fd); - return; - } - c->server = s; - c->fd = new_fd; - LKI(c->lock); - s->clients = eina_list_append(s->clients, c); -} - -static void -client_flush(Client *c) -{ - int num; - - num = write(c->fd, c->buf, c->bufsize); - if (num < 0) - { - c->dead = 1; - return; - } - if (num < c->bufsize) - { - unsigned char *buf; - - buf = malloc(c->bufsize - num); - if (buf) - { - memcpy(buf, c->buf + num, c->bufsize - num); - free(c->buf); - c->bufsize = c->bufsize - num; - c->bufalloc = c->bufsize; - c->buf = buf; - } - } - else - { - free(c->buf); - c->buf = NULL; - c->bufsize = 0; - c->bufalloc = 0; - } -} - -static void -client_buf_add(Client *c, unsigned char *data, int size) -{ - int newsize; - unsigned char *buf; - - newsize = c->bufsize + size; - if (newsize > c->bufalloc) - { - c->bufalloc = newsize + 16384; - buf = realloc(c->buf, c->bufalloc); - if (buf) c->buf = buf; - else return; - } - memcpy(c->buf + c->bufsize, data, size); - c->bufsize += size; -} - -static void -client_write(Client *c, unsigned char *data, int size) -{ - int num; - - if (!c->buf) - { - num = write(c->fd, data, size); - if (num != size) - client_buf_add(c, data + num, size - num); - } - else - { - client_buf_add(c, data, size); - } -} - -EAPI void -evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data) -{ - unsigned char *data2; - int *ints; - - data2 = malloc(size + (sizeof(int) * 3)); - if (!data2) return; - ints = (int *)data2; - ints[0] = size; - ints[1] = opcode; -// LKL(c->lock); - c->req_to++; - ints[2] = c->req_to; - memcpy(data2 + (sizeof(int) * 3), data, size); - client_write(c, data2, size + (sizeof(int) * 3)); -// LKU(c->lock); - free(data2); -} - -static void -server_message_handle(Server *s, Client *c, int opcode, int size, unsigned char *data) -{ - if (s->func) s->func(s->data, s, c, opcode, size, data); -} - -EAPI void -evas_cserve_server_message_handler_set(Server *s, int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data), void *data) -{ - s->func = func; - s->data = data; -} - -static int -server_parse(Server *s, Client *c) -{ - int *ints; - unsigned char *data, *newbuf; - - if (c->inbufsize < (int)sizeof(int)) return 0; - ints = (int *)((c->inbuf)); - if ((ints[0] < 0) || (ints[0] > (1024 * 1024))) - return 0; - if (c->inbufsize < (ints[0] + ((int)sizeof(int) * 3))) - { - return 0; - } - data = c->inbuf + (sizeof(int) * 3); - if (ints[2] != (c->req_from + 1)) - { - ERR("EEK! sequence number mismatch from client with pid: %i." - "---- num %i is not 1 more than %i" - , - c->pid, ints[2], c->req_from); - return 0; - } - c->req_from++; - server_message_handle(s, c, ints[1], ints[0], data); - c->inbufalloc -= ints[0] + (sizeof(int) * 3); - if (c->inbufalloc == 0) - { - free(c->inbuf); - c->inbuf = NULL; - c->inbufsize = 0; - return 0; - } - newbuf = malloc(c->inbufalloc); - if (!newbuf) - { - c->inbufalloc += ints[0] + (sizeof(int) * 3); - /* fixme - bad situation */ - return 0; - } - memcpy(newbuf, c->inbuf + ints[0] + (sizeof(int) * 3), c->inbufalloc); - c->inbufsize -= ints[0] + (sizeof(int) * 3); - free(c->inbuf); - c->inbuf = newbuf; - return 1; -} - -static void -server_data(Server *s, Client *c, unsigned char *data, int size) -{ - if (!c->inbuf) - { - c->inbuf = malloc(size); - if (c->inbuf) - { - memcpy(c->inbuf, data, size); - c->inbufalloc = size; - c->inbufsize = size; - } - else - { - /* fixme - bad situation */ - return; - } - } - else - { - int size2; - - size2 = c->inbufsize + size; - if (size2 > c->inbufalloc) - { - unsigned char *newbuf; - - c->inbufalloc = size2; - newbuf = realloc(c->inbuf, c->inbufalloc); - if (newbuf) c->inbuf = newbuf; - else size2 = 0; - } - if (size2 > 0) - { - memcpy(c->inbuf + c->inbufsize, data, size); - c->inbufsize = size2; - } - else - { - /* fixme - bad situation */ - return; - } - } - while (server_parse(s, c)); -} - -EAPI void -evas_cserve_server_wait(Server *s, int timeout) -{ - fd_set rset, wset, xset; - int maxfd; - int ret; - struct timeval to; - Eina_List *l, *dead = NULL; - Client *c; - - maxfd = 0; - FD_ZERO(&rset); - FD_ZERO(&wset); - FD_ZERO(&xset); - FD_SET(s->ch[0].fd, &rset); - if (s->ch[0].fd > maxfd) maxfd = s->ch[0].fd; - EINA_LIST_FOREACH(s->clients, l, c) - { - FD_SET(c->fd, &rset); - if (c->buf) - FD_SET(c->fd, &wset); - if (c->fd > maxfd) maxfd = c->fd; - } - if (timeout > 0) - { - to.tv_sec = timeout / 1000000; - to.tv_usec = timeout % 1000000; - ret = select(maxfd + 1, &rset, &wset, &xset, &to); - } - else - ret = select(maxfd + 1, &rset, &wset, &xset, NULL); - if (ret < 1) return; - - EINA_LIST_FOREACH(s->clients, l, c) - { - if (c->dead) continue; - if (FD_ISSET(c->fd, &rset)) - { - unsigned char buf[16384]; - int num; - - errno = 0; - num = read(c->fd, buf, sizeof(buf)); - if (num <= 0) - { - c->dead = 1; - dead = eina_list_append(dead, c); - } - else if (num > 0) - { - server_data(s, c, buf, num); - } - } - else if (FD_ISSET(c->fd, &wset)) - { - client_flush(c); - if (c->dead) dead = eina_list_append(dead, c); - } - } - if (FD_ISSET(s->ch[0].fd, &rset)) - { - server_accept(s); - } - EINA_LIST_FREE(dead, c) - { - LKL(c->lock); - if (c->func) c->func(c->data, c); - s->clients = eina_list_remove(s->clients, c); - close(c->fd); - if (c->buf) free(c->buf); - if (c->inbuf) free(c->inbuf); - LKD(c->lock); - free(c); - } -} - -#endif diff --git a/libraries/evas/src/lib/engines/Makefile.am b/libraries/evas/src/lib/engines/Makefile.am deleted file mode 100644 index 0e7706c..0000000 --- a/libraries/evas/src/lib/engines/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -SUBDIRS = common - -if BUILD_ENGINE_SOFTWARE_16 - -SUBDIRS += common_16 - -endif - -if BUILD_ENGINE_SOFTWARE_8 - -SUBDIRS += common_8 - -endif diff --git a/libraries/evas/src/lib/engines/Makefile.in b/libraries/evas/src/lib/engines/Makefile.in deleted file mode 100644 index b5cf292..0000000 --- a/libraries/evas/src/lib/engines/Makefile.in +++ /dev/null @@ -1,740 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_1 = common_16 -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_2 = common_8 -subdir = src/lib/engines -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = common common_16 common_8 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = common $(am__append_1) $(am__append_2) -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/Makefile.am b/libraries/evas/src/lib/engines/common/Makefile.am deleted file mode 100644 index 0937394..0000000 --- a/libraries/evas/src/lib/engines/common/Makefile.am +++ /dev/null @@ -1,118 +0,0 @@ - -SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I. \ - -I$(top_srcdir)/src/lib \ - -I$(top_srcdir)/src/lib/cserve \ - -I$(top_srcdir)/src/lib/include \ - -DPACKAGE_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_LIB_DIR=\"$(libdir)\" \ - -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ - @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ - @PIXMAN_CFLAGS@ \ - @EET_CFLAGS@ @pthread_cflags@ \ - @EINA_CFLAGS@ \ - @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ - @PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_engine_common.la -libevas_engine_common_la_SOURCES = \ -evas_op_copy_main_.c \ -evas_op_blend_main_.c \ -evas_op_add_main_.c \ -evas_op_sub_main_.c \ -evas_op_mask_main_.c \ -evas_op_mul_main_.c \ -evas_blend_main.c \ -evas_blit_main.c \ -evas_convert_color.c \ -evas_convert_colorspace.c \ -evas_convert_gry_1.c \ -evas_convert_gry_4.c \ -evas_convert_gry_8.c \ -evas_convert_main.c \ -evas_convert_rgb_16.c \ -evas_convert_rgb_24.c \ -evas_convert_rgb_32.c \ -evas_convert_rgb_8.c \ -evas_convert_grypal_6.c \ -evas_convert_yuv.c \ -evas_cpu.c \ -evas_draw_main.c \ -evas_font_draw.c \ -evas_font_load.c \ -evas_font_main.c \ -evas_font_query.c \ -evas_image_load.c \ -evas_image_save.c \ -evas_image_main.c \ -evas_image_data.c \ -evas_image_scalecache.c \ -evas_line_main.c \ -evas_polygon_main.c \ -evas_rectangle_main.c \ -evas_scale_main.c \ -evas_scale_sample.c \ -evas_scale_smooth.c \ -evas_scale_span.c \ -evas_tiler.c \ -evas_regionbuf.c \ -evas_pipe.c \ -language/evas_bidi_utils.c \ -language/evas_language_utils.c \ -evas_text_utils.c \ -evas_font_ot.c \ -evas_map_image.c \ -evas_map_image.h - -EXTRA_DIST = \ -evas_blend.h \ -evas_blend_private.h \ -evas_convert_color.h \ -evas_convert_colorspace.h \ -evas_convert_gry_1.h \ -evas_convert_gry_4.h \ -evas_convert_gry_8.h \ -evas_convert_grypal_6.h \ -evas_convert_main.h \ -evas_convert_rgb_16.h \ -evas_convert_rgb_24.h \ -evas_convert_rgb_32.h \ -evas_convert_rgb_8.h \ -evas_convert_yuv.h \ -evas_draw.h \ -evas_font.h \ -evas_font_default_walk.x \ -evas_font_private.h \ -evas_image.h \ -evas_image_private.h \ -evas_line.h \ -evas_polygon.h \ -evas_rectangle.h \ -evas_scale_main.h \ -evas_scale_smooth.h \ -evas_scale_smooth_scaler.c \ -evas_scale_smooth_scaler_down.c \ -evas_scale_smooth_scaler_downx.c \ -evas_scale_smooth_scaler_downx_downy.c \ -evas_scale_smooth_scaler_downy.c \ -evas_scale_smooth_scaler_noscale.c \ -evas_scale_smooth_scaler_up.c \ -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 \ -evas_map_image_core.c \ -evas_map_image_loop.c - -libevas_engine_common_la_DEPENDENCIES = \ -$(top_builddir)/config.h - -libevas_engine_common_la_LIBADD = \ -evas_op_blend/libevas_engine_common_op_blend_master_sse3.la diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in deleted file mode 100644 index 08526cd..0000000 --- a/libraries/evas/src/lib/engines/common/Makefile.in +++ /dev/null @@ -1,1009 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am_libevas_engine_common_la_OBJECTS = evas_op_copy_main_.lo \ - evas_op_blend_main_.lo evas_op_add_main_.lo \ - evas_op_sub_main_.lo evas_op_mask_main_.lo \ - evas_op_mul_main_.lo evas_blend_main.lo evas_blit_main.lo \ - evas_convert_color.lo evas_convert_colorspace.lo \ - evas_convert_gry_1.lo evas_convert_gry_4.lo \ - evas_convert_gry_8.lo evas_convert_main.lo \ - evas_convert_rgb_16.lo evas_convert_rgb_24.lo \ - evas_convert_rgb_32.lo evas_convert_rgb_8.lo \ - evas_convert_grypal_6.lo evas_convert_yuv.lo evas_cpu.lo \ - evas_draw_main.lo evas_font_draw.lo evas_font_load.lo \ - evas_font_main.lo evas_font_query.lo evas_image_load.lo \ - evas_image_save.lo evas_image_main.lo evas_image_data.lo \ - evas_image_scalecache.lo evas_line_main.lo \ - evas_polygon_main.lo evas_rectangle_main.lo evas_scale_main.lo \ - evas_scale_sample.lo evas_scale_smooth.lo evas_scale_span.lo \ - evas_tiler.lo evas_regionbuf.lo evas_pipe.lo \ - evas_bidi_utils.lo evas_language_utils.lo evas_text_utils.lo \ - evas_font_ot.lo evas_map_image.lo -libevas_engine_common_la_OBJECTS = \ - $(am_libevas_engine_common_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_engine_common_la_SOURCES) -DIST_SOURCES = $(libevas_engine_common_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = -I. \ - -I$(top_srcdir)/src/lib \ - -I$(top_srcdir)/src/lib/cserve \ - -I$(top_srcdir)/src/lib/include \ - -DPACKAGE_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_LIB_DIR=\"$(libdir)\" \ - -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ - @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ - @PIXMAN_CFLAGS@ \ - @EET_CFLAGS@ @pthread_cflags@ \ - @EINA_CFLAGS@ \ - @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ - @PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_engine_common.la -libevas_engine_common_la_SOURCES = \ -evas_op_copy_main_.c \ -evas_op_blend_main_.c \ -evas_op_add_main_.c \ -evas_op_sub_main_.c \ -evas_op_mask_main_.c \ -evas_op_mul_main_.c \ -evas_blend_main.c \ -evas_blit_main.c \ -evas_convert_color.c \ -evas_convert_colorspace.c \ -evas_convert_gry_1.c \ -evas_convert_gry_4.c \ -evas_convert_gry_8.c \ -evas_convert_main.c \ -evas_convert_rgb_16.c \ -evas_convert_rgb_24.c \ -evas_convert_rgb_32.c \ -evas_convert_rgb_8.c \ -evas_convert_grypal_6.c \ -evas_convert_yuv.c \ -evas_cpu.c \ -evas_draw_main.c \ -evas_font_draw.c \ -evas_font_load.c \ -evas_font_main.c \ -evas_font_query.c \ -evas_image_load.c \ -evas_image_save.c \ -evas_image_main.c \ -evas_image_data.c \ -evas_image_scalecache.c \ -evas_line_main.c \ -evas_polygon_main.c \ -evas_rectangle_main.c \ -evas_scale_main.c \ -evas_scale_sample.c \ -evas_scale_smooth.c \ -evas_scale_span.c \ -evas_tiler.c \ -evas_regionbuf.c \ -evas_pipe.c \ -language/evas_bidi_utils.c \ -language/evas_language_utils.c \ -evas_text_utils.c \ -evas_font_ot.c \ -evas_map_image.c \ -evas_map_image.h - -EXTRA_DIST = \ -evas_blend.h \ -evas_blend_private.h \ -evas_convert_color.h \ -evas_convert_colorspace.h \ -evas_convert_gry_1.h \ -evas_convert_gry_4.h \ -evas_convert_gry_8.h \ -evas_convert_grypal_6.h \ -evas_convert_main.h \ -evas_convert_rgb_16.h \ -evas_convert_rgb_24.h \ -evas_convert_rgb_32.h \ -evas_convert_rgb_8.h \ -evas_convert_yuv.h \ -evas_draw.h \ -evas_font.h \ -evas_font_default_walk.x \ -evas_font_private.h \ -evas_image.h \ -evas_image_private.h \ -evas_line.h \ -evas_polygon.h \ -evas_rectangle.h \ -evas_scale_main.h \ -evas_scale_smooth.h \ -evas_scale_smooth_scaler.c \ -evas_scale_smooth_scaler_down.c \ -evas_scale_smooth_scaler_downx.c \ -evas_scale_smooth_scaler_downx_downy.c \ -evas_scale_smooth_scaler_downy.c \ -evas_scale_smooth_scaler_noscale.c \ -evas_scale_smooth_scaler_up.c \ -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 \ -evas_map_image_core.c \ -evas_map_image_loop.c - -libevas_engine_common_la_DEPENDENCIES = \ -$(top_builddir)/config.h - -libevas_engine_common_la_LIBADD = \ -evas_op_blend/libevas_engine_common_op_blend_master_sse3.la - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_engine_common.la: $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_bidi_utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blend_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blit_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_color.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_colorspace.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_grypal_6.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_16.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_24.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_yuv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cpu.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_draw_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_draw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_load.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_ot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_query.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_scalecache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_language_utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_line_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map_image.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_add_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_blend_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_copy_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mask_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mul_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_sub_main_.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_pipe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_polygon_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_regionbuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_sample.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_smooth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_span.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_text_utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_tiler.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -evas_bidi_utils.lo: language/evas_bidi_utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_bidi_utils.lo -MD -MP -MF $(DEPDIR)/evas_bidi_utils.Tpo -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_bidi_utils.Tpo $(DEPDIR)/evas_bidi_utils.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_bidi_utils.c' object='evas_bidi_utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c - -evas_language_utils.lo: language/evas_language_utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_language_utils.lo -MD -MP -MF $(DEPDIR)/evas_language_utils.Tpo -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_language_utils.Tpo $(DEPDIR)/evas_language_utils.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_language_utils.c' object='evas_language_utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_blend.h b/libraries/evas/src/lib/engines/common/evas_blend.h deleted file mode 100644 index 1a98f3f..0000000 --- a/libraries/evas/src/lib/engines/common/evas_blend.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _EVAS_BLEND_H -#define _EVAS_BLEND_H - - -EAPI void evas_common_blend_init (void); - - -#endif /* _EVAS_BLEND_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_blend_main.c b/libraries/evas/src/lib/engines/common/evas_blend_main.c deleted file mode 100644 index 4aadd02..0000000 --- a/libraries/evas/src/lib/engines/common/evas_blend_main.c +++ /dev/null @@ -1,325 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - -#if defined BUILD_MMX || defined BUILD_SSE -#include "evas_mmx.h" -#endif - -const DATA32 ALPHA_255 = 255; -const DATA32 ALPHA_256 = 256; - -static void -_composite_span_nothing(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__, int l __UNUSED__) -{ -} - -static void -_composite_pt_nothing(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__) -{ -} - -static RGBA_Gfx_Compositor * -evas_gfx_compositor_get(unsigned char op) -{ - RGBA_Gfx_Compositor *comp; - - switch (op) - { - case _EVAS_RENDER_BLEND: - comp = evas_common_gfx_compositor_blend_get(); - break; - case _EVAS_RENDER_BLEND_REL: - comp = evas_common_gfx_compositor_blend_rel_get(); - break; - case _EVAS_RENDER_COPY: - comp = evas_common_gfx_compositor_copy_get(); - break; - case _EVAS_RENDER_COPY_REL: - comp = evas_common_gfx_compositor_copy_rel_get(); - break; -/* - case _EVAS_RENDER_ADD: - comp = evas_common_gfx_compositor_add_get(); - break; - case _EVAS_RENDER_ADD_REL: - comp = evas_common_gfx_compositor_add_rel_get(); - break; - case _EVAS_RENDER_SUB: - comp = evas_common_gfx_compositor_sub_get(); - break; - case _EVAS_RENDER_SUB_REL: - comp = evas_common_gfx_compositor_sub_rel_get(); - break; -*/ - case _EVAS_RENDER_MASK: - comp = evas_common_gfx_compositor_mask_get(); - break; - case _EVAS_RENDER_MUL: - comp = evas_common_gfx_compositor_mul_get(); - break; - default: - comp = evas_common_gfx_compositor_blend_get(); - break; - } - return comp; -} - -EAPI void -evas_common_blend_init(void) -{ - static int gfx_initialised = 0; - static int mmx = 0; - static int sse = 0; - static int sse2 = 0; - RGBA_Gfx_Compositor *comp; - - if (gfx_initialised) return; - gfx_initialised = 1; - - evas_common_cpu_can_do(&mmx, &sse, &sse2); - - comp = evas_common_gfx_compositor_copy_get(); - if (comp) comp->init(); - comp = evas_common_gfx_compositor_copy_rel_get(); - if (comp) comp->init(); - - comp = evas_common_gfx_compositor_blend_get(); - if (comp) comp->init(); - comp = evas_common_gfx_compositor_blend_rel_get(); - if (comp) comp->init(); - -/* - comp = evas_common_gfx_compositor_add_get(); - if (comp) comp->init(); - comp = evas_common_gfx_compositor_add_rel_get(); - if (comp) comp->init(); - comp = evas_common_gfx_compositor_sub_get(); - if (comp) comp->init(); - comp = evas_common_gfx_compositor_sub_rel_get(); - if (comp) comp->init(); -*/ - comp = evas_common_gfx_compositor_mask_get(); - if (comp) comp->init(); - - comp = evas_common_gfx_compositor_mul_get(); - if (comp) comp->init(); -} - -void -evas_common_blend_shutdown(void) -{ - RGBA_Gfx_Compositor *comp; - - comp = evas_common_gfx_compositor_copy_get(); - if (comp) comp->shutdown(); - comp = evas_common_gfx_compositor_copy_rel_get(); - if (comp) comp->shutdown(); - - comp = evas_common_gfx_compositor_blend_get(); - if (comp) comp->shutdown(); - comp = evas_common_gfx_compositor_blend_rel_get(); - if (comp) comp->shutdown(); - -/* - comp = evas_common_gfx_compositor_add_get(); - if (comp) comp->shutdown(); - comp = evas_common_gfx_compositor_add_rel_get(); - if (comp) comp->shutdown(); - comp = evas_common_gfx_compositor_sub_get(); - if (comp) comp->shutdown(); - comp = evas_common_gfx_compositor_sub_rel_get(); - if (comp) comp->shutdown(); -*/ - comp = evas_common_gfx_compositor_mask_get(); - if (comp) comp->shutdown(); - - comp = evas_common_gfx_compositor_mul_get(); - if (comp) comp->shutdown(); -} - - -RGBA_Gfx_Func -evas_common_gfx_func_composite_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Func func = NULL; - - if (src && (!src->cache_entry.flags.alpha)) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_span_get(src, dst, pixels); - if (func) - return func; - return _composite_span_nothing; -} - -RGBA_Gfx_Func -evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Func func = NULL; - - if ((col & 0xff000000) == 0xff000000) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_color_span_get(col, dst, pixels); - if (func) - return func; - return _composite_span_nothing; -} - -RGBA_Gfx_Func -evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Func func = NULL; - - if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000)) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_color_span_get(src, col, dst, pixels); - if (func) - return func; - return _composite_span_nothing; -} - -RGBA_Gfx_Func -evas_common_gfx_func_composite_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Func func = NULL; - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_mask_color_span_get(col, dst, pixels); - if (func) - return func; - return _composite_span_nothing; -} - -RGBA_Gfx_Func -evas_common_gfx_func_composite_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Func func = NULL; - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_mask_span_get(src, dst, pixels); - if (func) - return func; - return _composite_span_nothing; -} - -RGBA_Gfx_Pt_Func -evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Pt_Func func = NULL; - - if (!src_flags.alpha) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_pt_get(src_flags, dst); - if (func) - return func; - return _composite_pt_nothing; -} - -RGBA_Gfx_Pt_Func -evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Pt_Func func = NULL; - - if ((col & 0xff000000) == 0xff000000) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_color_pt_get(col, dst); - if (func) - return func; - return _composite_pt_nothing; -} - -RGBA_Gfx_Pt_Func -evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Pt_Func func = NULL; - - if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000)) - { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; - } - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_color_pt_get(src_flags, col, dst); - if (func) - return func; - return _composite_pt_nothing; -} - -RGBA_Gfx_Pt_Func -evas_common_gfx_func_composite_mask_color_pt_get(DATA32 col, RGBA_Image *dst, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Pt_Func func = NULL; - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_mask_color_pt_get(col, dst); - if (func) - return func; - return _composite_pt_nothing; -} - -RGBA_Gfx_Pt_Func -evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) -{ - RGBA_Gfx_Compositor *comp; - RGBA_Gfx_Pt_Func func = NULL; - - comp = evas_gfx_compositor_get(op); - if (comp) - func = comp->composite_pixel_mask_pt_get(src_flags, dst); - if (func) - return func; - return _composite_pt_nothing; -} diff --git a/libraries/evas/src/lib/engines/common/evas_blend_private.h b/libraries/evas/src/lib/engines/common/evas_blend_private.h deleted file mode 100644 index 1d14951..0000000 --- a/libraries/evas/src/lib/engines/common/evas_blend_private.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _EVAS_BLEND_PRIVATE_H -#define _EVAS_BLEND_PRIVATE_H - - -RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_rel_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_rel_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_rel_get (void); -/* -RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_get(void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_rel_get(void); -*/ -RGBA_Gfx_Compositor *evas_common_gfx_compositor_mask_get (void); -RGBA_Gfx_Compositor *evas_common_gfx_compositor_mul_get (void); - -RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); -RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); -RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get (RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op); -RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); -RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); - -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); - - -#endif /* _EVAS_BLEND_PRIVATE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_blit_main.c b/libraries/evas/src/lib/engines/common/evas_blit_main.c deleted file mode 100644 index 4c077b3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_blit_main.c +++ /dev/null @@ -1,700 +0,0 @@ -#include "evas_common.h" - -#if defined BUILD_MMX || defined BUILD_SSE -#include "evas_mmx.h" -#endif - -#define ALIGN_FIX - -static void evas_common_copy_pixels_c (DATA32 *src, DATA32 *dst, int len); -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); -static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); - -#ifdef BUILD_NEON -static void evas_common_copy_pixels_neon (DATA32 *src, DATA32 *dst, int len); -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); -static void evas_common_copy_pixels_rev_mmx (DATA32 *src, DATA32 *dst, int len); -static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); - -static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len); - - -EAPI void -evas_common_blit_init(void) -{ -} - -EAPI void -evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y) -{ - int y; - Gfx_Func_Copy func; - DATA32 *src_ptr, *dst_ptr; - - /* clip clip clip */ - if (w <= 0) return; - if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x; - if (w <= 0) return; - if (src_x < 0) - { - dst_x -= src_x; - w += src_x; - src_x = 0; - } - if (w <= 0) return; - - if (h <= 0) return; - if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y; - if (h <= 0) return; - if (src_y < 0) - { - dst_y -= src_y; - h += src_y; - src_y = 0; - } - if (h <= 0) return; - - if (w <= 0) return; - if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x; - if (w <= 0) return; - if (dst_x < 0) - { - src_x -= dst_x; - w += dst_x; - dst_x = 0; - } - if (w <= 0) return; - - if (h <= 0) return; - if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y; - if (h <= 0) return; - if (dst_y < 0) - { - src_y -= dst_y; - h += dst_y; - dst_y = 0; - } - if (h <= 0) return; - - if (dst == src) - { - /* src after dst - go forward */ - if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * dst->cache_entry.w) + dst_x)) - { - func = evas_common_draw_func_copy_get(w, 0); - for (y = 0; y < h; y++) - { - src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; - dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; - func(src_ptr, dst_ptr, w); - } - } - /* reverse */ - else - { - func = evas_common_draw_func_copy_get(w, 1); - for (y = h - 1; y >= 0; y--) - { - src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; - dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; - func(src_ptr, dst_ptr, w); - } - } - } - else - { - func = evas_common_draw_func_copy_get(w, 0); - for (y = 0; y < h; y++) - { - src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; - dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; - func(src_ptr, dst_ptr, w); - } - } -} - -/****************************************************************************/ - -static void -evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *dst_end = dst + len; - - src += len - 1; - while (dst < dst_end) *dst++ = *src--; -} - - -#ifdef BUILD_NEON -static void -evas_common_copy_pixels_rev_neon(DATA32 *src, DATA32 *dst, int len) -{ - uint32_t *tmp = (void *)37; -#define AP "evas_common_copy_rev_pixels_neon_" - asm volatile ( - ".fpu neon \n\t" - // Can we do 32 byte? - "andS %[tmp], %[d], $0x1f \n\t" - "beq "AP"quadstart \n\t" - - // Can we do at least 16 byte? - "andS %[tmp], %[d], $0x4 \n\t" - "beq "AP"dualstart \n\t" - - // Only once - AP"singleloop: \n\t" - "sub %[s], #4 \n\t" - "vld1.32 d0[0], [%[s]] \n\t" - "vst1.32 d0[0], [%[d]]! \n\t" - - // Up to 3 times - AP"dualstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #31 \n\t" - "blt "AP"loopout \n\t" - - "andS %[tmp], %[d], $0x1f \n\t" - "beq "AP"quadstart \n\t" - - AP"dualloop: \n\t" - "sub %[s], #8 \n\t" - "vldm %[s], {d0} \n\t" - "vrev64.32 d1, d0 \n\t" - "vstm %[d]!, {d1} \n\t" - - "andS %[tmp], %[d], $0x1f \n\t" - "bne "AP"dualloop \n\t" - - - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp],%[e],#32 \n\t" - - AP "quadloop: \n\t" - "sub %[s], #32 \n\t" - "vldm %[s], {d0,d1,d2,d3} \n\t" - - "vrev64.32 d7,d0 \n\t" - "vrev64.32 d6,d1 \n\t" - "vrev64.32 d5,d2 \n\t" - "vrev64.32 d4,d3 \n\t" - - "vstm %[d]!, {d4,d5,d6,d7} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"quadloop \n\t" - - - AP "loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],$0x7 \n\t" - AP "dualloop2int: \n\t" - "sub %[s], #8 \n\t" - "vldm %[s], {d0} \n\t" - "vrev64.32 d1,d0 \n\t" - "vstm %[d]!, {d1} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2int \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP "singleloop2: \n\t" - "sub %[s], #4 \n\t" - "vld1.32 d0[0], [%[s]] \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - - AP "done:\n\t" - - : // No output regs - // Input - : [s] "r" (src + len), [e] "r" (dst + len), [d] "r" (dst),[tmp] "r" (tmp) - // Clobbered - : "q0","q1","q2","q3","0","1","memory" - ); -#undef AP - -} -#endif - - -#ifdef BUILD_C -static void -evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *dst_end = dst + len; - - while (dst < dst_end) *dst++ = *src++; -} -#endif - -#ifdef BUILD_MMX -static void -evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len) -{ // XXX cppcheck: [./src/lib/engines/common/evas_blit_main.c:248]: (error) Invalid number of character ({). Can't process file. - // so... wtf? what's wrong with this { ? or anytrhing surrounding it? - DATA32 *dst_end, *dst_end_pre; -#ifdef ALIGN_FIX - intptr_t src_align; - intptr_t dst_align; - - src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ - dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ - - if ((src_align != dst_align) || - ((src_align & 0x3) != 0)) - { -#ifdef BUILD_C - evas_common_copy_pixels_c(src, dst, len); - return; - } -#endif - - while ((src_align > 0) && (len > 0)) - { - *dst++ = *src++; - len--; - src_align -= sizeof(DATA32); - } -#endif /* ALIGN_FIX */ - - dst_end = dst + len; - dst_end_pre = dst + ((len / 16) * 16); - - while (dst < dst_end_pre) - { - MOVE_16DWORDS_MMX(src, dst); - src += 16; - dst += 16; - } - while (dst < dst_end) *dst++ = *src++; -} -#endif - -#ifdef BUILD_MMX -static void -evas_common_copy_pixels_mmx2(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *dst_end, *dst_end_pre; -#ifdef ALIGN_FIX - intptr_t src_align; - intptr_t dst_align; - - src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ - dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ - - if ((src_align != dst_align) || - ((src_align & 0x3) != 0)) - { -#ifdef BUILD_C - evas_common_copy_pixels_c(src, dst, len); -#endif - return; - } - - while ((src_align > 0) && (len > 0)) - { - *dst++ = *src++; - len--; - src_align -= sizeof(DATA32); - } -#endif - - dst_end = dst + len; - dst_end_pre = dst + ((len / 16) * 16); - - while (dst < dst_end_pre) - { - MOVE_16DWORDS_MMX(src, dst); - src += 16; - dst += 16; - } - while (dst < dst_end) *dst++ = *src++; -} -#endif - -#ifdef BUILD_NEON -static void -evas_common_copy_pixels_neon(DATA32 *src, DATA32 *dst, int len){ - uint32_t *e,*tmp = (void *)37; - e = dst + len; -#define AP "evas_common_copy_pixels_neon_" - asm volatile ( - ".fpu neon \n\t" - // Can we do 32 byte? - "andS %[tmp], %[d], $0x1f \n\t" - "beq "AP"quadstart \n\t" - - // Can we do at least 16 byte? - "andS %[tmp], %[d], $0x4 \n\t" - "beq "AP"dualstart \n\t" - - // Only once - AP"singleloop: \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - "vst1.32 d0[0], [%[d]]! \n\t" - - // Up to 3 times - AP"dualstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #31 \n\t" - "blt "AP"loopout \n\t" - - "andS %[tmp], %[d], $0x1f \n\t" - "beq "AP"quadstart \n\t" - - AP"dualloop: \n\t" - "vldm %[s]!, {d0} \n\t" - "vstm %[d]!, {d0} \n\t" - - "andS %[tmp], %[d], $0x1f \n\t" - "bne "AP"dualloop \n\t" - - - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #64 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp],%[e],#63 \n\t" - - AP "quadloop: \n\t" - "vldm %[s]!, {d0,d1,d2,d3} \n\t" - "vldm %[s]!, {d4,d5,d6,d7} \n\t" - "vstm %[d]!, {d0,d1,d2,d3} \n\t" - "vstm %[d]!, {d4,d5,d6,d7} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"quadloop \n\t" - - - AP "loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],$0x7 \n\t" - AP "dualloop2int: \n\t" - "vldm %[s]!, {d0} \n\t" - "vstm %[d]!, {d0} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2int \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP "singleloop2: \n\t" - "vld1.32 d0[0], [%[s]] \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - - AP "done:\n\t" - - : // No output regs - // Input - : [s] "r" (src), [e] "r" (e), [d] "r" (dst),[tmp] "r" (tmp) - // Clobbered - : "q0","q1","q2","q3","memory" - ); -#undef AP - -} -#endif /* BUILD_NEON */ - -#ifdef BUILD_SSE -static void -evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *src_ptr, *dst_ptr, *dst_end_ptr; - - dst_end_ptr = dst + len; - dst_end_ptr -= 15; - src_ptr = src; - dst_ptr = dst; - while (dst_ptr < dst_end_ptr) - { - MOVE_16DWORDS_MMX2(src_ptr, dst_ptr); - src_ptr+=16; - dst_ptr+=16; - } - dst_end_ptr = dst + len; - while (dst_ptr < dst_end_ptr) - { - *dst_ptr = *src_ptr; - src_ptr++; - dst_ptr++; - } -#if 0 -#ifdef ALIGN_FIX - int src_align; - int dst_align; - - src_align = (int)src & 0x3f; /* 64 byte alignment */ - dst_align = (int)dst & 0x3f; /* 64 byte alignment */ - - if ((src_align != dst_align) || - ((src_align & 0x3) != 0)) - { -#ifdef BUILD_C - evas_common_copy_pixels_c(src, dst, len); -#endif - return; - } - - while ((src_align > 0) && (len > 0)) - { - *dst = *src; - dst++; - src++; - len--; - src_align -= sizeof(DATA32); - } -#endif /* ALIGN_FIX */ - - src_ptr = src; - dst_ptr = dst; - dst_end_ptr = dst + len; - dst_end_ptr_pre = dst + ((len / 16) * 16); - - while (dst_ptr < dst_end_ptr_pre) - { - prefetch(&src_ptr[16]); - MOVE_16DWORDS_MMX(src_ptr, dst_ptr); - src_ptr+=16; - dst_ptr+=16; - } - while (dst_ptr < dst_end_ptr) - { - *dst_ptr = *src_ptr; - src_ptr++; - dst_ptr++; - } -#endif -} -#endif - -/****************************************************************************/ - -#ifdef BUILD_C -static void -evas_common_copy_pixels_rev_c(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *dst_end; - - src = src + len - 1; - dst_end = dst - 1; - dst = dst + len - 1; - - while (dst > dst_end) *dst-- = *src--; -} -#endif - -#ifdef BUILD_MMX -static void -evas_common_copy_pixels_rev_mmx(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *dst_end, *dst_end_pre; - - if (len >= 16) - { - src = src + len - 16; - dst_end = dst; - dst_end_pre = dst + len - ((len / 16) * 16); - dst = dst + len - 16; - - while (dst >= dst_end_pre) - { - MOVE_16DWORDS_MMX(src, dst); - src -= 16; - dst -= 16; - } - src += 15; - dst += 15; - while (dst >= dst_end) - *dst-- = *src--; - } - else - { - src = src + len - 1; - dst_end = dst - 1; - dst = dst + len - 1; - while (dst > dst_end) - *dst-- = *src--; - } -} -#endif - -#ifdef BUILD_SSE -static void -evas_common_copy_pixels_rev_sse(DATA32 *src, DATA32 *dst, int len) -{ - DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; - - src_ptr = src + len - 16; - dst_ptr = dst + len - 16; - dst_end_ptr = dst; - dst_end_ptr_pre = dst + len - ((len / 16) * 16); - - if (len >= 16) - { - while (dst_ptr >= dst_end_ptr_pre) - { - prefetch(&src_ptr[-16]); - MOVE_10DWORDS_MMX(src_ptr, dst_ptr); - src_ptr -= 16; - dst_ptr -= 16; - } - src_ptr += 15; - dst_ptr += 15; - while (dst_ptr >= dst_end_ptr) - { - *dst_ptr = *src_ptr; - src_ptr--; - dst_ptr--; - } - } - else - { - src_ptr = src + len - 1; - dst_ptr = dst + len - 1; - while (dst_ptr >= dst_end_ptr) - { - *dst_ptr = *src_ptr; - src_ptr--; - dst_ptr--; - } - } -} -#endif - - -Gfx_Func_Copy -evas_common_draw_func_copy_get(int pixels, int reverse) -{ - if (reverse == -1) - return evas_common_copy_rev_pixels_c; - if (reverse) - { -#ifdef BUILD_SSE - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) - return evas_common_copy_pixels_rev_sse; -#endif -#ifdef BUILD_MMX -# ifdef BUILD_SSE - else -# endif - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - return evas_common_copy_pixels_rev_mmx; -#endif -#ifdef BUILD_NEON -# if defined(BUILD_SSE) || defined(BUILD_MMX) - else -# endif - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - return evas_common_copy_pixels_rev_neon; -#endif - -#ifdef BUILD_C -# if defined(BUILD_MMX) || defined(BUILD_NEON) - else -# endif - return evas_common_copy_pixels_rev_c; -#endif - } - else - { -#if 1 - -# ifdef BUILD_MMX -# ifdef BUILD_C - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) -# endif - return evas_common_copy_pixels_mmx2; -# ifdef BUILD_SSE - else -# endif -#endif -#ifdef BUILD_SSE -# ifdef BUILD_C - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) -# endif - return evas_common_copy_pixels_sse; -# ifdef BUILD_MMX - else -# endif -#endif -# ifdef BUILD_NEON -# ifdef BUILD_C - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) -# endif - return evas_common_copy_pixels_neon; -# ifdef BUILD_SSE - else -# endif -#endif -#ifdef BUILD_MMX -# ifdef BUILD_C - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) -# endif - return evas_common_copy_pixels_mmx; -# ifdef BUILD_C - else -# endif -#endif -#ifdef BUILD_C - return evas_common_copy_pixels_c; -#endif - -#else - -# ifdef BUILD_SSE - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) - return evas_common_copy_pixels_sse; -# ifdef BUILD_MMX - else -# endif -#endif -#ifdef BUILD_MMX -# ifdef BUILD_C - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) -# endif - return evas_common_copy_pixels_mmx2; -# ifdef BUILD_C - else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) -# endif - return evas_common_copy_pixels_mmx; -# ifdef BUILD_C - else -# endif -#endif -#ifdef BUILD_C - return evas_common_copy_pixels_c; -#endif - -#endif - } -#ifdef BUILD_C - return evas_common_copy_pixels_c; -#else - return NULL; -#endif -} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.c b/libraries/evas/src/lib/engines/common/evas_convert_color.c deleted file mode 100644 index 70a9e90..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_color.c +++ /dev/null @@ -1,246 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_color.h" - - -EAPI DATA32 -evas_common_convert_argb_premul(DATA32 *data, unsigned int len) -{ - DATA32 *de = data + len; - DATA32 nas = 0; - - while (data < de) - { - DATA32 a = 1 + (*data >> 24); - - *data = (*data & 0xff000000) + - (((((*data) >> 8) & 0xff) * a) & 0xff00) + - (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); - data++; - - if ((a == 1) || (a == 256)) - nas++; - } - - return nas; -} - -EAPI void -evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len) -{ - DATA32 *de = data + len; - - while (data < de) - { - DATA32 a = (*data >> 24); - - if ((a > 0) && (a < 255)) - *data = ARGB_JOIN(a, - (R_VAL(data) * 255) / a, - (G_VAL(data) * 255) / a, - (B_VAL(data) * 255) / a); - data++; - } - -} - -EAPI void -evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b) -{ - a++; - if (r) { *r = (a * *r) >> 8; } - if (g) { *g = (a * *g) >> 8; } - if (b) { *b = (a * *b) >> 8; } -} - -EAPI void -evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b) -{ - if (!a) return; - if (r) { *r = (255 * *r) / a; } - if (g) { *g = (255 * *g) / a; } - if (b) { *b = (255 * *b) / a; } -} - -EAPI void -evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) -{ - int i; - float f; - - v *= 255; - if (s == 0) - { - if (r) *r = v; - if (g) *g = v; - if (b) *b = v; - return; - } - - h /= 60; - i = h; - f = h - i; - - s *= v; - f *= s; - s = v - s; - - switch (i) - { - case 1: - if (r) *r = v - f; if (g) *g = v; if (b) *b = s; - return; - case 2: - if (r) *r = s; if (g) *g = v; if (b) *b = s + f; - return; - case 3: - if (r) *r = s; if (g) *g = v - f; if (b) *b = v; - return; - case 4: - if (r) *r = s + f; if (g) *g = s; if (b) *b = v; - return; - case 5: - if (r) *r = v; if (g) *g = s; if (b) *b = v - f; - return; - default: - if (r) *r = v; if (g) *g = s + f; if (b) *b = s; - break; - } -} - -EAPI void -evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) -{ - int max, min, d = r - g; - - //set min to MIN(g,r) - d = (d & (~(d >> 8))); - min = r - d; - //set max to MAX(g,r) - max = g + d; - - //set min to MIN(b,min) - d = min - b; - min -= (d & (~(d >> 8))); - - //set max to MAX(max,b) - d = b - max; - max += (d & (~(d >> 8))); - - d = max - min; - - if (v) *v = (max / 255.0); - if (!max || !d) - { - if (s) *s = 0; - if (h) *h = 0; - return; - } - - if (s) *s = (d / (float)max); - if (r == max) - { - if (h) - { - *h = 60 * ((g - b) / (float)d); - if (*h < 0) *h += 360; - } - return; - } - if (g == max) - { - if (h) - { - *h = 120 + (60 * ((b - r) / (float)d)); - if (*h < 0) *h += 360; - } - return; - } - if (h) - { - *h = 240 + (60 * ((r - g) / (float)d)); - if (*h < 0) *h += 360; - } -} - -EAPI void -evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b) -{ - int i, f; - - if (!s) - { - *r = *g = *b = v; - return; - } - - i = h / 255; - f = h - (i * 255); - s = (v * s) / 255; - f = (s * f) / 255; - s = v - s; - - switch (i) - { - case 1: - *r = v - f; *g = v; *b = s; - return; - case 2: - *r = s; *g = v; *b = s + f; - return; - case 3: - *r = s; *g = v - f; *b = v; - return; - case 4: - *r = s + f; *g = s; *b = v; - return; - case 5: - *r = v; *g = s; *b = v - f; - return; - default: - *r = v; *g = s + f; *b = s; - break; - } -} - -EAPI void -evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v) -{ - int min, max, d = r - g; - - d = (d & (~(d >> 8))); - min = r - d; - max = g + d; - - d = min - b; - min -= (d & (~(d >> 8))); - - d = b - max; - max += (d & (~(d >> 8))); - - d = max - min; - - *v = max; - if (!max) - { - *s = *h = 0; - return; - } - - *s = ((d * 255) / max); - - if (r == max) - { - *h = (((g - b) * 255) / d); - if (*h < 0) *h += 1530; - return; - } - if (g == max) - { - *h = 510 + (((b - r) * 255) / d); - if (*h < 0) *h += 1530; - return; - } - *h = 1020 + (((r - g) * 255) / d); - if (*h < 0) *h += 1530; - -} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_color.h b/libraries/evas/src/lib/engines/common/evas_convert_color.h deleted file mode 100644 index 0224879..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_color.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _EVAS_CONVERT_COLOR_H -#define _EVAS_CONVERT_COLOR_H - - -EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len); -EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len); -EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b); -EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b); - -EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); -EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); -EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b); -EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v); - - -#endif /* _EVAS_CONVERT_COLOR_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c deleted file mode 100644 index 013c2e7..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.c +++ /dev/null @@ -1,186 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_colorspace.h" - -#define CONVERT_RGB_565_TO_RGB_888(s) \ - (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ - ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ - ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) - -#define CONVERT_A5P_TO_A8(s) \ - ((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) - -#define CONVERT_ARGB_8888_TO_A_8(s) ((s) >> 24) - - -static inline void * -evas_common_convert_argb8888_to_rgb565_a5p(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__, int stride __UNUSED__, Eina_Bool has_alpha __UNUSED__) -{ - return NULL; -} - -static inline void * -evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride, Eina_Bool has_alpha) -{ - DATA16 *src, *end; - DATA32 *ret, *dst; - - src = data; - end = src + (stride * h); - ret = malloc(w * h * sizeof(DATA32)); - - dst = ret; - if (has_alpha) - { - DATA8 *alpha; - - alpha = (DATA8 *)end; - for (; src < end; src++, alpha++, dst++) - *dst = (CONVERT_A5P_TO_A8(*alpha) << 24) | - CONVERT_RGB_565_TO_RGB_888(*src); - } - else - { - for (; src < end; src++, dst++) - *dst = CONVERT_RGB_565_TO_RGB_888(*src); - } - return ret; -} - -static inline void * -evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha) -{ - uint32_t *src, *end; - uint8_t *ret, *dst; - - src = data; - end = src + (stride * h); - ret = malloc(w * h); - if (!ret) return NULL; - - if (!has_alpha) - { - return memset(ret, 0xff, w * h); - } - - dst = ret; - for ( ; src < end ; src++, dst++) - *dst = CONVERT_ARGB_8888_TO_A_8(*src); - return ret; -} - - - -EAPI void * -evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_RGB565_A5P: - return evas_common_convert_argb8888_to_rgb565_a5p(data, w, h, stride, has_alpha); - default: - break; - } - return NULL; -} - -EAPI void * -evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - return evas_common_convert_rgb565_a5p_to_argb8888(data, w, h, stride, has_alpha); - default: - break; - } - return NULL; -} - -EAPI void * -evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - { - void *dst; - - fprintf(stderr, "to argb888\n"); - - dst = malloc(sizeof (unsigned int) * w * h); - if (!dst) return NULL; - - evas_common_convert_yuv_422_601_rgba(data, dst, w, h); - return dst; - } - default: - break; - } - return NULL; -} - -EAPI void * -evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - { - void *dst; - - dst = malloc(sizeof (unsigned int) * w * h); - if (!dst) return NULL; - - evas_common_convert_yuv_420p_601_rgba(data, dst, w, h); - break; - } - default: - break; - } - return NULL; -} - -EAPI void * -evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - { - void *dst; - - dst = malloc(sizeof (unsigned int) * w * h); - if (!dst) return NULL; - - evas_common_convert_yuv_420_601_rgba(data, dst, w, h); - break; - } - default: - break; - } - return NULL; -} - -EAPI void * -evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace) -{ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - { - void *dst; - - dst = malloc(sizeof (unsigned int) * w * h); - if (!dst) return NULL; - - evas_common_convert_yuv_420_601_rgba(data, dst, w, h); - break; - } - default: - break; - } - return NULL; -} - - -/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h b/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h deleted file mode 100644 index f3bec78..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_colorspace.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EVAS_CONVERT_COLORSPACE_H -#define _EVAS_CONVERT_COLORSPACE_H - - -EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); -EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); -EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace); -EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace); -EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace); -EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace); - -#endif /* _EVAS_CONVERT_COLORSPACE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c deleted file mode 100644 index 45e16ee..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_gry_1.h" - -#ifdef BUILD_CONVERT_1_GRY_1 -void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h deleted file mode 100644 index 38d6776..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_1.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _EVAS_CONVERT_GRY_1_H -#define _EVAS_CONVERT_GRY_1_H - - -void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - - - -#endif /* _EVAS_CONVERT_GRY_1_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c deleted file mode 100644 index 2fa7ee3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_gry_4.h" - -#ifdef BUILD_CONVERT_4_GRY_4 -void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} -#endif - -#ifdef BUILD_CONVERT_4_GRY_1 -void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h deleted file mode 100644 index 1614359..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_4.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _EVAS_CONVERT_GRY_4_H -#define _EVAS_CONVERT_GRY_4_H - - -void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - - -#endif /* _EVAS_CONVERT_GRY_4_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c deleted file mode 100644 index 9bc5ca7..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.c +++ /dev/null @@ -1,78 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_gry_8.h" - -#ifdef USE_DITHER_44 -extern const DATA8 _evas_dither_44[4][4]; -#endif -#ifdef USE_DITHER_128128 -extern const DATA8 _evas_dither_128128[128][128]; -#endif - -#ifdef BUILD_CONVERT_8_GRY_1 -void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA32 gry8; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = (R_VAL(src_ptr)); - g = (G_VAL(src_ptr)); - b = (B_VAL(src_ptr)); - - // Y = 0.299 * R + 0.587 * G + 0.114 * B; - gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; - - *dst_ptr = gry8; - - CONVERT_LOOP_END_ROT_0(); -} -#endif - -#ifdef BUILD_CONVERT_8_GRY_4 -void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} -#endif - -#ifdef BUILD_CONVERT_8_GRY_16 -void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA32 gry8; - DATA8 dith; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - - r = (R_VAL(src_ptr)); - g = (G_VAL(src_ptr)); - b = (B_VAL(src_ptr)); - - // Y = 0.299 * R + 0.587 * G + 0.114 * B; - gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; - - if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++; - - *dst_ptr = gry8; - - CONVERT_LOOP_END_ROT_0(); -} -#endif - -#ifdef BUILD_CONVERT_8_GRY_64 -void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} -#endif - -#ifdef BUILD_CONVERT_8_GRY_256 -void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h b/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h deleted file mode 100644 index d70f59d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_gry_8.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _EVAS_CONVERT_GRY_8_H -#define _EVAS_CONVERT_GRY_8_H - - -void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - - -#endif /* _EVAS_CONVERT_GRY_8_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c deleted file mode 100644 index 2351fda..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_grypal_6.h" - -#ifdef BUILD_CONVERT_8_GRAYSCALE_64 -void evas_common_convert_rgba_to_8bpp_pal_gray64(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 Y; - - dst_ptr = dst; - CONVERT_LOOP_START_ROT_0(); - - /* RGB -> YUV conversion */ - Y = ((R_VAL(src_ptr) * 76) + - (G_VAL(src_ptr) * 151) + - (B_VAL(src_ptr) * 29)) >> 10; - *dst_ptr = pal[Y]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h b/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h deleted file mode 100644 index 5f839c2..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _EVAS_CONVERT_GRY_4_H -#define _EVAS_CONVERT_GRY_4_H - -void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -#endif /* _EVAS_CONVERT_GRY_4_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.c b/libraries/evas/src/lib/engines/common/evas_convert_main.c deleted file mode 100644 index da19f9c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_main.c +++ /dev/null @@ -1,632 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_rgb_8.h" -#include "evas_convert_rgb_16.h" -#include "evas_convert_rgb_24.h" -#include "evas_convert_rgb_32.h" -#include "evas_convert_grypal_6.h" -#include "evas_convert_gry_8.h" -#include "evas_convert_yuv.h" - -#ifdef USE_DITHER_44 - -const DATA8 _evas_dither_44[4][4] = -{ - { 0, 8, 2, 10}, - {12, 4, 14, 6}, - { 3, 11, 1, 9}, - {15, 7, 13, 5} -}; - -#endif - -#ifdef USE_DITHER_128128 - -const DATA8 _evas_dither_128128[128][128] = -{ - { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, - { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, - { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, - { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, - { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, - { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, - { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, - { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, - { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, - { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, - { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, - { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, - { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, - { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, - { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, - { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, - { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, - { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, - { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, - { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, - { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, - { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, - { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, - { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, - { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, - { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, - { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, - { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, - { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, - { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, - { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, - { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, - { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, - { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, - { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, - { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, - { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, - { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, - { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, - { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, - { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, - { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, - { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, - { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, - { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, - { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, - { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, - { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, - { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, - { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, - { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, - { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, - { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, - { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, - { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, - { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, - { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, - { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, - { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, - { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, - { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, - { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, - { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, - { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, - { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, - { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, - { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, - { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, - { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, - { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, - { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, - { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, - { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, - { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, - { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, - { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, - { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, - { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, - { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, - { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, - { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, - { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, - { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, - { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, - { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, - { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, - { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, - { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, - { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, - { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, - { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, - { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, - { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, - { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, - { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, - { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, - { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, - { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, - { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, - { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, - { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, - { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, - { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, - { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, - { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, - { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, - { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, - { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, - { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, - { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, - { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, - { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, - { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, - { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, - { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, - { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, - { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, - { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, - { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, - { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, - { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, - { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, - { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, - { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, - { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, - { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, - { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, - { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } -}; - -#endif /* USE_DITHER_128128 */ - -EAPI void -evas_common_convert_init(void) -{ -} - -EAPI Gfx_Func_Convert -evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation) -{ - if ((rmask == 0) && (gmask == 0) && (bmask == 0)) - { - if (depth == 8) - { -#ifdef BUILD_CONVERT_8_GRY_1 - if (pal_mode == PAL_MODE_NONE) - return evas_common_convert_rgba_to_8bpp_gry_256_dith; -#endif -#ifdef BUILD_CONVERT_8_GRY_16 - if (pal_mode == PAL_MODE_NONE) - return evas_common_convert_rgba_to_8bpp_gry_16_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_332 - if (pal_mode == PAL_MODE_RGB332) - return evas_common_convert_rgba_to_8bpp_rgb_332_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_666 - if (pal_mode == PAL_MODE_RGB666) - return evas_common_convert_rgba_to_8bpp_rgb_666_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_232 - if (pal_mode == PAL_MODE_RGB232) - return evas_common_convert_rgba_to_8bpp_rgb_232_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_222 - if (pal_mode == PAL_MODE_RGB222) - return evas_common_convert_rgba_to_8bpp_rgb_222_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_221 - if (pal_mode == PAL_MODE_RGB221) - return evas_common_convert_rgba_to_8bpp_rgb_221_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_121 - if (pal_mode == PAL_MODE_RGB121) - return evas_common_convert_rgba_to_8bpp_rgb_121_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_111 - if (pal_mode == PAL_MODE_RGB111) - return evas_common_convert_rgba_to_8bpp_rgb_111_dith; -#endif -#ifdef BUILD_CONVERT_8_GRAYSCALE_64 - if (pal_mode == PAL_MODE_GRAY64) - return evas_common_convert_rgba_to_8bpp_pal_gray64; -#endif - } - } - else - { - if (depth == 16) - { -#ifdef BUILD_CONVERT_16_RGB_565 - if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_565_dith; - else - return evas_common_convert_rgba_to_16bpp_rgb_565_dith; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 90) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90; - } -#endif - } -#endif -#ifdef BUILD_CONVERT_16_BGR_565 - if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_bgr_565_dith; - else - return evas_common_convert_rgba_to_16bpp_bgr_565_dith; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 90) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90; - } -#endif - } -#endif -#ifdef BUILD_CONVERT_16_RGB_555 - if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_555_dith; - else - return evas_common_convert_rgba_to_16bpp_rgb_555_dith; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 90) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90; - } -#endif - } -#endif -#ifdef BUILD_CONVERT_16_RGB_444 - if ((rmask == 0x00000f00) && (gmask == 0x000000f0) && (bmask == 0x0000000f)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_444_dith; - else - return evas_common_convert_rgba_to_16bpp_rgb_444_dith; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 90) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90; - } -#endif - } -#endif -#ifdef BUILD_CONVERT_16_RGB_454645 - if ((rmask == 0x0000f000) && (gmask == 0x00000780) && (bmask == 0x0000001e)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; - - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; - } -#endif - } -#endif -#ifdef BUILD_CONVERT_16_RGB_454645 - if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) - { -#ifdef BUILD_CONVERT_16_RGB_ROT0 - if (rotation == 0) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; - - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT180 - if (rotation == 180) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT270 - if (rotation == 270) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; - } -#endif -#ifdef BUILD_CONVERT_16_RGB_ROT90 - if (rotation == 90) - { - if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) - return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; - else - return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; - } -#endif - } -#endif - } - if (depth == 32) - { -#ifdef BUILD_CONVERT_32_RGB_8888 - if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) - { -#ifdef BUILD_CONVERT_32_RGB_ROT0 - if (rotation == 0) - return evas_common_convert_rgba_to_32bpp_rgb_8888; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT180 - if (rotation == 180) - return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT270 - if (rotation == 270) - return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT90 - if (rotation == 90) - return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; -#endif - } -#endif -#ifdef BUILD_CONVERT_32_RGBX_8888 - if ((rmask == 0xff000000) && (gmask == 0x00ff0000) && (bmask == 0x0000ff00)) - { -#ifdef BUILD_CONVERT_32_RGB_ROT0 - if (rotation == 0) - return evas_common_convert_rgba_to_32bpp_rgbx_8888; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT180 - if (rotation == 180) - return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT270 - if (rotation == 270) - return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT90 - if (rotation == 90) - return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90; -#endif - } -#endif -#ifdef BUILD_CONVERT_32_BGR_8888 - if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) - { -#ifdef BUILD_CONVERT_32_RGB_ROT0 - if (rotation == 0) - return evas_common_convert_rgba_to_32bpp_bgr_8888; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT180 - if (rotation == 180) - return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT270 - if (rotation == 270) - return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT90 - if (rotation == 90) - return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90; -#endif - } -#endif -#ifdef BUILD_CONVERT_32_BGRX_8888 - if ((rmask == 0x0000ff00) && (gmask == 0x00ff0000) && (bmask == 0xff000000)) - { -#ifdef BUILD_CONVERT_32_RGB_ROT0 - if (rotation == 0) - return evas_common_convert_rgba_to_32bpp_bgrx_8888; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT180 - if (rotation == 180) - return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT270 - if (rotation == 270) - return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT90 - if (rotation == 90) - return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90; -#endif - } -#endif -#ifdef BUILD_CONVERT_32_RGB_666 - if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) - { -#ifdef BUILD_CONVERT_32_RGB_ROT0 - if (rotation == 0) - return evas_common_convert_rgba_to_32bpp_rgb_666; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT180 -// if (rotation == 180) -// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT270 -// if (rotation == 270) -// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; -#endif -#ifdef BUILD_CONVERT_32_RGB_ROT90 -// if (rotation == 90) -// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; -#endif - } -#endif - } - if (depth == 24) - { -#ifdef BUILD_CONVERT_24_RGB_888 - if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) - { - if (rotation == 0) - return evas_common_convert_rgba_to_24bpp_rgb_888; - } -#endif -#ifdef BUILD_CONVERT_24_RGB_666 - if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) - { - if (rotation == 0) - return evas_common_convert_rgba_to_24bpp_rgb_666; - } -#endif -#ifdef BUILD_CONVERT_24_BGR_888 - if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) - { - if (rotation == 0) - return evas_common_convert_rgba_to_24bpp_bgr_888; - } -#endif - } - INF("depth = %i mode = %i", depth, pal_mode); - if (depth == 8) - { -#ifdef BUILD_CONVERT_8_RGB_332 - if (pal_mode == PAL_MODE_RGB332) - return evas_common_convert_rgba_to_8bpp_rgb_332_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_666 - if (pal_mode == PAL_MODE_RGB666) - return evas_common_convert_rgba_to_8bpp_rgb_666_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_232 - if (pal_mode == PAL_MODE_RGB232) - return evas_common_convert_rgba_to_8bpp_rgb_232_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_222 - if (pal_mode == PAL_MODE_RGB222) - return evas_common_convert_rgba_to_8bpp_rgb_222_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_221 - if (pal_mode == PAL_MODE_RGB221) - return evas_common_convert_rgba_to_8bpp_rgb_221_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_121 - if (pal_mode == PAL_MODE_RGB121) - return evas_common_convert_rgba_to_8bpp_rgb_121_dith; -#endif -#ifdef BUILD_CONVERT_8_RGB_111 - if (pal_mode == PAL_MODE_RGB111) - return evas_common_convert_rgba_to_8bpp_rgb_111_dith; -#endif - } - } - /* no optimised converter for this... no generic one either. NULL */ - return NULL; -} diff --git a/libraries/evas/src/lib/engines/common/evas_convert_main.h b/libraries/evas/src/lib/engines/common/evas_convert_main.h deleted file mode 100644 index 51c2cc8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_main.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _EVAS_CONVERT_MAIN_H -#define _EVAS_CONVERT_MAIN_H - - -EAPI void evas_common_convert_init (void); -EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation); - - -#endif /* _EVAS_CONVERT_MAIN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c deleted file mode 100644 index 796ff17..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c +++ /dev/null @@ -1,2089 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_rgb_16.h" - -#ifndef BUILD_NO_DITHER_MASK -#ifdef USE_DITHER_44 -extern const DATA8 _evas_dither_44[4][4]; -#endif -#ifdef USE_DITHER_128128 -extern const DATA8 _evas_dither_128128[128][128]; -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ -#ifndef BUILD_NO_DITHER_MASK - DATA16 *d = (DATA16 *)dst; - DATA32 r1, g1, b1; - DATA32 r2, g2, b2; - unsigned int dith, dith2; - int x, y; - -#ifdef BUILD_LINE_DITHER_MASK - for (y = 0; y < h; y++) - { - if ((y + dith_y) & 0x1) - { - for (x = 0; x < w; x+=2) - { - DATA32 p = *src++, q = *src++; - r1 = ((p & 0xff0000) + 0x030000) >> 19; - if (r1 > 0x1f) r1 = 0x1f; - g1 = ((p & 0xff00) + 0x000100) >> 10; - if (g1 > 0x3f) g1 = 0x3f; - b1 = ((p & 0xff) + 0x000003) >> 3; - if (b1 > 0x1f) b1 = 0x1f; - r2 = ((q & 0xff0000) + 0x030000) >> 19; - if (r2 > 0x1f) r2 = 0x1f; - g2 = ((q & 0xff00) + 0x000100) >> 10; - if (g2 > 0x3f) g2 = 0x3f; - b2 = ((q & 0xff) + 0x000003) >> 3; - if (b2 > 0x1f) b2 = 0x1f; -#ifndef WORDS_BIGENDIAN - *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | - (r1 << 11) | (g1 << 5) | (b1); -#else - *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | - (r2 << 11) | (g2 << 5) | (b2); -#endif - d += 2; - } - } - else - { - x = w; - while (w > 0) - { - DATA32 p = *src++, q = *src++; - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)d) = - (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | - (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); -#else - *((DATA32 *)d) = - (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | - (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); -#endif - d += 2; w -= 2; - } - w = x; - } - src += src_jump; - d += dst_jump; - } -#else - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - DATA32 p = *src++, q = *src++; - - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; - dith2 = dith >> DM_SHF(6); - dith >>= DM_SHF(5); - r1 = (p & 0xff0000) >> 19; - g1 = (p & 0xff00) >> 10; - b1 = (p & 0xff) >> 3; - if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++; - if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++; - if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++; - - x++; - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; - dith2 = dith >> DM_SHF(6); - dith >>= DM_SHF(5); - r2 = (q & 0xff0000) >> 19; - g2 = (q & 0xff00) >> 10; - b2 = (q & 0xff) >> 3; - if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++; - if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++; - if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++; - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | - (r1 << 11) | (g1 << 5) | (b1); -#else - *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | - (r2 << 11) | (g2 << 5) | (b2); -#endif - d += 2; - } - src += src_jump; - d += dst_jump; - } -#endif - return; - (void)pal; -#else - DATA16 *d = (DATA16 *)dst; - int w0 = w; - - while (h--) - { - while (w > 0) - { - DATA32 p = *src++, q = *src++; - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)d) = - (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | - (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); -#else - *((DATA32 *)d) = - (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | - (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); -#endif - d += 2; w -= 2; - } - w = w0; - src += src_jump; - d += dst_jump; - } - return; - (void)pal; -#endif -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ -#ifndef BUILD_NO_DITHER_MASK - DATA16 *d = (DATA16 *)dst; - DATA32 r, g, b; - unsigned int dith, dith2; - int x, y; - -#ifdef BUILD_LINE_DITHER_MASK - for (y = 0; y < h; y++) - { - if ((y + dith_y) & 0x1) - { - for (x = 0; x < w; x++) - { - DATA32 p = *src++; - - r = (p & 0xff0000) >> 19; - if (r > 0x1f) r = 0x1f; - g = (p & 0xff00) >> 10; - if (g > 0x3f) g = 0x3f; - b = (p & 0xff) >> 3; - if (b > 0x1f) b = 0x1f; - *d++ = (r << 11) | (g << 5) | b; - } - } - else - { - x = w; - while (w--) - { - *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); - src++; - } - w = x; - } - src += src_jump; - d += dst_jump; - } -#else - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - DATA32 p = *src++; - - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; - dith2 = dith >> DM_SHF(6); - dith >>= DM_SHF(5); - r = (p & 0xff0000) >> 19; - g = (p & 0xff00) >> 10; - b = (p & 0xff) >> 3; - if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++; - if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++; - if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++; - - *d++ = (r << 11) | (g << 5) | b; - } - src += src_jump; - d += dst_jump; - } -#endif - return; - (void)pal; -#else - DATA16 *d = (DATA16 *)dst; - int w0 = w; - - while (h--) - { - while (w--) - { - *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); - src++; - } - w = w0; - src += src_jump; - d += dst_jump; - } - return; - (void)pal; -#endif -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_180(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_180(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 27) | (g2 << 21) | (b2 << 16) | - (r1 << 11) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 27) | (g1 << 21) | (b1 << 16) | - (r2 << 11) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 11) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_270(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_270(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 27) | (g2 << 21) | (b2 << 16) | - (r1 << 11) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 27) | (g1 << 21) | (b1 << 16) | - (r2 << 11) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 11) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_90(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_90(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 27) | (g2 << 21) | (b2 << 16) | - (r1 << 11) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 27) | (g1 << 21) | (b1 << 16) | - (r2 << 11) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_565 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 11) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_0(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_0(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (b2 << 27) | (g2 << 21) | (r2 << 16) | - (b1 << 11) | (g1 << 5 ) | (r1 ); -#else - *((DATA32 *)dst_ptr) = - (b1 << 27) | (g1 << 21) | (r1 << 16) | - (b2 << 11) | (g2 << 5 ) | (r2 ); -#endif - - CONVERT_LOOP2_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (b << 11) | (g << 5) | (r); - - CONVERT_LOOP_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_180(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_180(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (b2 << 27) | (g2 << 21) | (r2 << 16) | - (b1 << 11) | (g1 << 5 ) | (r1 ); -#else - *((DATA32 *)dst_ptr) = - (b1 << 27) | (g1 << 21) | (r1 << 16) | - (b2 << 11) | (g2 << 5 ) | (r2 ); -#endif - - CONVERT_LOOP2_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180"); - - CONVERT_LOOP_START_ROT_180(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (b << 11) | (g << 5) | (r); - - CONVERT_LOOP_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_270(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_270(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (b2 << 27) | (g2 << 21) | (r2 << 16) | - (b1 << 11) | (g1 << 5 ) | (r1 ); -#else - *((DATA32 *)dst_ptr) = - (b1 << 27) | (g1 << 21) | (r1 << 16) | - (b2 << 11) | (g2 << 5 ) | (r2 ); -#endif - - CONVERT_LOOP2_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (b << 11) | (g << 5) | (r); - - CONVERT_LOOP_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_90(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 2; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_90(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 2; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (b2 << 27) | (g2 << 21) | (r2 << 16) | - (b1 << 11) | (g1 << 5 ) | (r1 ); -#else - *((DATA32 *)dst_ptr) = - (b1 << 27) | (g1 << 21) | (r1 << 16) | - (b2 << 11) | (g2 << 5 ) | (r2 ); -#endif - - CONVERT_LOOP2_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_BGR_565 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith, dith2; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 2; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); - if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (b << 11) | (g << 5) | (r); - - CONVERT_LOOP_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_0(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_0(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 24) | (g2 << 20) | (b2 << 16) | - (r1 << 8 ) | (g1 << 4 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 24) | (g1 << 20) | (b1 << 16) | - (r2 << 8 ) | (g2 << 4 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 8) | (g << 4) | (b); - - CONVERT_LOOP_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_180(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_180(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 24) | (g2 << 20) | (b2 << 16) | - (r1 << 8 ) | (g1 << 4 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 24) | (g1 << 20) | (b1 << 16) | - (r2 << 8 ) | (g2 << 4 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 8) | (g << 4) | (b); - - CONVERT_LOOP_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_270(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_270(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 24) | (g2 << 20) | (b2 << 16) | - (r1 << 8 ) | (g1 << 4 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 24) | (g1 << 20) | (b1 << 16) | - (r2 << 8 ) | (g2 << 4 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 8) | (g << 4) | (b); - - CONVERT_LOOP_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_90(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_90(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 24) | (g2 << 20) | (b2 << 16) | - (r1 << 8 ) | (g1 << 4 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 24) | (g1 << 20) | (b1 << 16) | - (r2 << 8 ) | (g2 << 4 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_444 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 8) | (g << 4) | (b); - - CONVERT_LOOP_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_0(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_0(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 28) | (g2 << 23) | (b2 << 17) | - (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 28) | (g1 << 23) | (b1 << 17) | - (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); -#endif - - CONVERT_LOOP2_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 12) | (g << 7) | (b << 1); - - CONVERT_LOOP_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_180(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_180(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 28) | (g2 << 23) | (b2 << 17) | - (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 28) | (g1 << 23) | (b1 << 17) | - (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); -#endif - - CONVERT_LOOP2_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 12) | (g << 7) | (b << 1); - - CONVERT_LOOP_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_270(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_270(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 28) | (g2 << 23) | (b2 << 17) | - (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 28) | (g1 << 23) | (b1 << 17) | - (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); -#endif - - CONVERT_LOOP2_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 12) | (g << 7) | (b << 1); - - CONVERT_LOOP_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_90(); - - r1 = (R_VAL(src_ptr)) >> 4; - g1 = (G_VAL(src_ptr)) >> 4; - b1 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_90(); - - r2 = (R_VAL(src_ptr)) >> 4; - g2 = (G_VAL(src_ptr)) >> 4; - b2 = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 28) | (g2 << 23) | (b2 << 17) | - (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 28) | (g1 << 23) | (b1 << 17) | - (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); -#endif - - CONVERT_LOOP2_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_454645 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - r = (R_VAL(src_ptr)) >> 4; - g = (G_VAL(src_ptr)) >> 4; - b = (B_VAL(src_ptr)) >> 4; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); - if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; - if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; - if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; -#endif - - *dst_ptr = (r << 12) | (g << 7) | (b << 1); - - CONVERT_LOOP_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_0(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 3; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_0(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 3; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 26) | (g2 << 21) | (b2 << 16) | - (r1 << 10) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 26) | (g1 << 21) | (b1 << 16) | - (r2 << 10) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT0 -void -evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 3; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 10) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_0(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_180(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 3; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_180(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 3; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 26) | (g2 << 21) | (b2 << 16) | - (r1 << 10) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 26) | (g1 << 21) | (b1 << 16) | - (r2 << 10) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT180 -void -evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 3; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 10) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_180(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_270(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 3; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_270(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 3; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 26) | (g2 << 21) | (b2 << 16) | - (r1 << 10) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 26) | (g1 << 21) | (b1 << 16) | - (r2 << 10) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT270 -void -evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 3; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 10) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_270(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r1, g1, b1; - DATA8 r2, g2, b2; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP2_START_ROT_90(); - - r1 = (R_VAL(src_ptr)) >> 3; - g1 = (G_VAL(src_ptr)) >> 3; - b1 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; - if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; - if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; -#endif - - CONVERT_LOOP2_INC_ROT_90(); - - r2 = (R_VAL(src_ptr)) >> 3; - g2 = (G_VAL(src_ptr)) >> 3; - b2 = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; - if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; - if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; -#endif - -#ifndef WORDS_BIGENDIAN - *((DATA32 *)dst_ptr) = - (r2 << 26) | (g2 << 21) | (b2 << 16) | - (r1 << 10) | (g1 << 5 ) | (b1 ); -#else - *((DATA32 *)dst_ptr) = - (r1 << 26) | (g1 << 21) | (b1 << 16) | - (r2 << 10) | (g2 << 5 ) | (b2 ); -#endif - - CONVERT_LOOP2_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - -#ifdef BUILD_CONVERT_16_RGB_555 -#ifdef BUILD_CONVERT_16_RGB_ROT90 -void -evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA16 *dst_ptr; - int x, y; - DATA8 r, g, b; -#ifndef BUILD_NO_DITHER_MASK - DATA8 dith; -#endif - - dst_ptr = (DATA16 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - r = (R_VAL(src_ptr)) >> 3; - g = (G_VAL(src_ptr)) >> 3; - b = (B_VAL(src_ptr)) >> 3; - -#ifndef BUILD_NO_DITHER_MASK - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); - if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; - if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; - if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; -#endif - - *dst_ptr = (r << 10) | (g << 5) | (b); - - CONVERT_LOOP_END_ROT_90(); - return; - (void)pal; -} -#endif -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h deleted file mode 100644 index f7ae63c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _EVAS_CONVERT_RGB_16_H -#define _EVAS_CONVERT_RGB_16_H - - -void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - - -#endif /* _EVAS_CONVERT_RGB_16_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c deleted file mode 100644 index 9efa006..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c +++ /dev/null @@ -1,89 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_rgb_24.h" - -#ifdef BUILD_CONVERT_24_RGB_888 -void -evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - - dst_ptr = (DATA8 *)dst; - src_ptr = (DATA32 *)src; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - dst_ptr[0] = R_VAL(src_ptr); - dst_ptr[1] = G_VAL(src_ptr); - dst_ptr[2] = B_VAL(src_ptr); - src_ptr++; - dst_ptr+=3; - } - src_ptr += src_jump; - dst_ptr += (dst_jump * 3); - } - return; -} -#endif -#ifdef BUILD_CONVERT_24_RGB_666 -void -evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr, *scratch_ptr; - DATA32 scratch; - int x, y; - - dst_ptr = (DATA8 *)dst; - src_ptr = (DATA32 *)src; - - scratch_ptr = (DATA8 *)(&scratch); - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - scratch = - (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | - ((G_VAL(src_ptr) << 4) & 0x000fc0); - dst_ptr[0] = scratch_ptr[1]; - dst_ptr[1] = scratch_ptr[2]; - dst_ptr[2] = scratch_ptr[3]; - src_ptr++; - dst_ptr+=3; - } - src_ptr += src_jump; - dst_ptr += (dst_jump * 3); - } - return; -} -#endif -#ifdef BUILD_CONVERT_24_BGR_888 -void -evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - - dst_ptr = (DATA8 *)dst; - src_ptr = (DATA32 *)src; - - for (y = 0; y < h; y++) - { - for (x = 0; x < w; x++) - { - dst_ptr[2] = R_VAL(src_ptr); - dst_ptr[1] = G_VAL(src_ptr); - dst_ptr[0] = B_VAL(src_ptr); - src_ptr++; - dst_ptr+=3; - } - src_ptr += src_jump; - dst_ptr += (dst_jump * 3); - } - return; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h deleted file mode 100644 index bc114ca..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _EVAS_CONVERT_RGB_24_H -#define _EVAS_CONVERT_RGB_24_H - - -void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -void evas_common_convert_rgba_to_24bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -#endif /* _EVAS_CONVERT_RGB_24_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c deleted file mode 100644 index 0401a4a..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c +++ /dev/null @@ -1,625 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_rgb_32.h" - -#ifdef BUILD_CONVERT_32_RGB_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT0 -void -evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int y; - Gfx_Func_Copy func; - - dst_ptr = (DATA32 *)dst; - src_ptr = src; - - func = evas_common_draw_func_copy_get(w, 0); - - for (y = 0; y < h; y++) - { - func(src_ptr, dst_ptr, w); - src_ptr += w + src_jump; - dst_ptr += w + dst_jump; - } - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGB_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT180 -void -evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_180(); - return; -} -#endif -#endif - -#ifdef TILE_ROTATE -#define FAST_SIMPLE_ROTATE(suffix, pix_type) \ - static void \ - blt_rotated_90_trivial_##suffix(pix_type *dst, \ - int dst_stride, \ - const pix_type *src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, y; \ - for (y = 0; y < h; y++) \ - { \ - const pix_type *s = src + (h - y - 1); \ - pix_type *d = dst + (dst_stride * y); \ - for (x = 0; x < w; x++) \ - { \ - *d++ = *s; \ - s += src_stride; \ - } \ - } \ - } \ - static void \ - blt_rotated_270_trivial_##suffix(pix_type *dst, \ - int dst_stride, \ - const pix_type *src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, y; \ - for (y = 0; y < h; y++) \ - { \ - const pix_type *s = src + (src_stride * (w - 1)) + y; \ - pix_type *d = dst + (dst_stride * y); \ - for (x = 0; x < w; x++) \ - { \ - *d++ = *s; \ - s -= src_stride; \ - } \ - } \ - } \ - static void \ - blt_rotated_90_##suffix(pix_type *dst, \ - int dst_stride, \ - const pix_type *src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, leading_pixels = 0, trailing_pixels = 0; \ - const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ - if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - leading_pixels = TILE_SIZE - \ - (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (leading_pixels > w) \ - leading_pixels = w; \ - blt_rotated_90_trivial_##suffix(dst, \ - dst_stride, \ - src, \ - src_stride, \ - leading_pixels, \ - h); \ - dst += leading_pixels; \ - src += leading_pixels * src_stride; \ - w -= leading_pixels; \ - } \ - if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - trailing_pixels = (((uintptr_t)(dst + w) & \ - (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (trailing_pixels > w) \ - trailing_pixels = w; \ - w -= trailing_pixels; \ - } \ - for (x = 0; x < w; x += TILE_SIZE) \ - { \ - blt_rotated_90_trivial_##suffix(dst + x, \ - dst_stride, \ - src + (src_stride * x), \ - src_stride, \ - TILE_SIZE, \ - h); \ - } \ - if (trailing_pixels) \ - blt_rotated_90_trivial_##suffix(dst + w, \ - dst_stride, \ - src + (w * src_stride), \ - src_stride, \ - trailing_pixels, \ - h); \ - } \ - static void \ - blt_rotated_270_##suffix(pix_type *dst, \ - int dst_stride, \ - const pix_type *src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, leading_pixels = 0, trailing_pixels = 0; \ - const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ - if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - leading_pixels = TILE_SIZE - \ - (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (leading_pixels > w) \ - leading_pixels = w; \ - blt_rotated_270_trivial_##suffix(dst, \ - dst_stride, \ - src + (src_stride * (w - leading_pixels)), \ - src_stride, \ - leading_pixels, \ - h); \ - dst += leading_pixels; \ - w -= leading_pixels; \ - } \ - if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - trailing_pixels = (((uintptr_t)(dst + w) & \ - (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (trailing_pixels > w) \ - trailing_pixels = w; \ - w -= trailing_pixels; \ - src += trailing_pixels * src_stride; \ - } \ - for (x = 0; x < w; x += TILE_SIZE) \ - { \ - blt_rotated_270_trivial_##suffix(dst + x, \ - dst_stride, \ - src + (src_stride * (w - x - TILE_SIZE)), \ - src_stride, \ - TILE_SIZE, \ - h); \ - } \ - if (trailing_pixels) \ - blt_rotated_270_trivial_##suffix(dst + w, \ - dst_stride, \ - src - (trailing_pixels * src_stride), \ - src_stride, \ - trailing_pixels, \ - h); \ - } - -FAST_SIMPLE_ROTATE(8888, DATA8) -#endif - - -#ifdef BUILD_CONVERT_32_RGB_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT270 -void -evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ -#ifdef TILE_ROTATE - blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; -#else - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_270(); -#endif - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGB_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT90 -void -evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ -# ifndef BUILD_NEON -# ifdef TILE_ROTATE - blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; -# else - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); -# endif - -# else - -# ifdef TILE_ROTATE - blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; -# else - if ((w & 1) || (h & 1)) - { - /* Rarely (if ever) if ever: so slow path is fine */ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); - } - else - { -# define AP "convert_rgba32_rot_90_" - asm volatile ( - ".fpu neon \n\t" - " mov %[s1], %[src] \n\t" - " add %[s1], %[s1], %[h],lsl #2 \n\t" - " sub %[s1], #8 \n\t" - - " mov %[s2], %[src] \n\t" - " add %[s2], %[s2], %[h], lsl #3 \n\t" - " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" - " sub %[s2], #8 \n\t" - - " mov %[d1], %[dst] \n\t" - - " add %[d2], %[d1], %[djmp] \n\t" - " add %[d2], %[d2], %[w], lsl #2 \n\t" - - " mov %[sadv], %[h], lsl #3 \n\t" - " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" - - " mov %[y], #0 \n\t" - " mov %[x], #0 \n\t" - AP"loop: \n\t" - " vld1.u32 d0, [%[s1]] \n\t" - " vld1.u32 d1, [%[s2]] \n\t" - " add %[x], #2 \n\t" - " add %[s1], %[sadv] \n\t" - " add %[s2], %[sadv] \n\t" - " vtrn.u32 d0, d1 \n\t" - " cmp %[x], %[w] \n\t" - " vst1.u32 d1, [%[d1]]! \n\t" - " vst1.u32 d0, [%[d2]]! \n\t" - " blt "AP"loop \n\t" - - " mov %[x], #0 \n\t" - " add %[d1], %[djmp] \n\t" - " add %[d1], %[d1], %[w], lsl #2 \n\t" - " add %[d2], %[djmp] \n\t" - " add %[d2], %[d2], %[w], lsl #2 \n\t" - - " mov %[s1], %[src] \n\t" - " add %[s1], %[s1], %[h], lsl #2 \n\t" - " sub %[s1], %[s1], %[y], lsl #2 \n\t" - " sub %[s1], #16 \n\t" - - " add %[s2], %[s1], %[h], lsl #2 \n\t" - " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" - - " add %[y], #2 \n\t" - - " cmp %[y], %[h] \n\t" - " blt "AP"loop \n\t" - - : // Out - : [s1] "r" (1), - [s2] "r" (11), - [d1] "r" (2), - [d2] "r" (12), - [src] "r" (src), - [dst] "r" (dst), - [x] "r" (3), - [y] "r" (4), - [w] "r" (w), - [h] "r" (h), - [sadv] "r" (5), - [sjmp] "r" (src_jump * 4), - [djmp] "r" (dst_jump * 4 * 2) - : "d0", "d1", "memory", "cc"// Clober - - - ); - } -# undef AP -# endif -# endif - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGBX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT0 -void -evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_0(); - -// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); - *dst_ptr = (*src_ptr << 8); - - CONVERT_LOOP_END_ROT_0(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGBX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT180 -void -evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_180(); - -// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); - *dst_ptr = (*src_ptr << 8); - - CONVERT_LOOP_END_ROT_180(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGBX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT270 -void -evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_270(); - -// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); - *dst_ptr = (*src_ptr << 8); - - CONVERT_LOOP_END_ROT_270(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGBX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT90 -void -evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_90(); - -// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); - *dst_ptr = (*src_ptr << 8); - - CONVERT_LOOP_END_ROT_90(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGR_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT0 -void -evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); - - CONVERT_LOOP_END_ROT_0(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGR_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT180 -void -evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); - - CONVERT_LOOP_END_ROT_180(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGR_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT270 -void -evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); - - CONVERT_LOOP_END_ROT_270(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGR_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT90 -void -evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); - - CONVERT_LOOP_END_ROT_90(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGRX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT0 -void -evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); - - CONVERT_LOOP_END_ROT_0(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGRX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT180 -void -evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_180(); - - *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); - - CONVERT_LOOP_END_ROT_180(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGRX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT270 -void -evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_270(); - - *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); - - CONVERT_LOOP_END_ROT_270(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_BGRX_8888 -#ifdef BUILD_CONVERT_32_RGB_ROT90 -void -evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); - - CONVERT_LOOP_END_ROT_90(); - return; -} -#endif -#endif - -#ifdef BUILD_CONVERT_32_RGB_666 -#ifdef BUILD_CONVERT_32_RGB_ROT0 -void -evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) -{ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - *dst_ptr = - (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | - ((G_VAL(src_ptr) << 4) & 0x000fc0); - - CONVERT_LOOP_END_ROT_0(); - return; -} -#endif -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h deleted file mode 100644 index 75595c7..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _EVAS_CONVERT_RGB_32_H -#define _EVAS_CONVERT_RGB_32_H - - -void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -void evas_common_convert_rgba_to_32bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -#endif /* _EVAS_CONVERT_RGB_32_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c deleted file mode 100644 index f69f398..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c +++ /dev/null @@ -1,248 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_rgb_8.h" - -#ifdef USE_DITHER_44 -extern const DATA8 _evas_dither_44[4][4]; -#endif -#ifdef USE_DITHER_128128 -extern const DATA8 _evas_dither_128128[128][128]; -#endif - -#ifdef BUILD_CONVERT_8_RGB_332 -void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith, dith2; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); - dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); -/* r = (R_VAL(src_ptr)) >> (8 - 3);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 3);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 3))) >= dith ) && (r < 0x07)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ - r = (R_VAL(src_ptr)) * 7 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 7)) >= dith ) && (r < 0x07)) r++; - g = (G_VAL(src_ptr)) * 7 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; - b = (B_VAL(src_ptr)) * 3 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; - - *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_666 -static DATA8 p_to_6[256]; -static DATA8 p_to_6_err[256]; - -void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith; - static int tables_calcualted = 0; - - if (!tables_calcualted) - { - int i; - - tables_calcualted = 1; - for (i = 0; i < 256; i++) - p_to_6[i] = (i * 5) / 255; - for (i = 0; i < 256; i++) - p_to_6_err[i] = ((i * 5) - (p_to_6[i] * 255)) * DM_DIV / 255; - } - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - r = p_to_6[(R_VAL(src_ptr))]; - g = p_to_6[(G_VAL(src_ptr))]; - b = p_to_6[(B_VAL(src_ptr))]; - dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; - if ((p_to_6_err[(R_VAL(src_ptr))] >= dith ) && (r < 5)) r++; - if ((p_to_6_err[(G_VAL(src_ptr))] >= dith ) && (g < 5)) g++; - if ((p_to_6_err[(B_VAL(src_ptr))] >= dith ) && (b < 5)) b++; - - *dst_ptr = pal[(r * 36) + (g * 6) + (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_232 -void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith, dith2; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); - dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); -/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 3);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith2) && (r < 0x03)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ - r = (R_VAL(src_ptr)) * 3 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith2) && (r < 0x03)) r++; - g = (G_VAL(src_ptr)) * 7 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; - b = (B_VAL(src_ptr)) * 3 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; - - *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_222 -void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); -/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 2);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith ) && (b < 0x03)) b++;*/ - r = (R_VAL(src_ptr)) * 3 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; - g = (G_VAL(src_ptr)) * 3 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; - b = (B_VAL(src_ptr)) * 3 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith ) && (b < 0x03)) b++; - - *dst_ptr = pal[(r << 4) | (g << 2) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_221 -void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith, dith2; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); - dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); -/* r = (R_VAL(src_ptr)) >> (8 - 2);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ - r = (R_VAL(src_ptr)) * 3 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; - g = (G_VAL(src_ptr)) * 3 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; - b = (B_VAL(src_ptr)) * 1 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; - - *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_121 -void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith, dith2; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); - dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); -/* r = (R_VAL(src_ptr)) >> (8 - 1);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 2);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith2) && (r < 0x01)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ - - r = (R_VAL(src_ptr)) * 1 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith2) && (r < 0x01)) r++; - g = (G_VAL(src_ptr)) * 3 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; - b = (B_VAL(src_ptr)) * 1 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; - - *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif -#ifdef BUILD_CONVERT_8_RGB_111 -void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) -{ - DATA32 *src_ptr; - DATA8 *dst_ptr; - int x, y; - DATA8 r, g, b; - DATA8 dith; - - dst_ptr = (DATA8 *)dst; - - CONVERT_LOOP_START_ROT_0(); - - dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); -/* r = (R_VAL(src_ptr)) >> (8 - 1);*/ -/* g = (G_VAL(src_ptr)) >> (8 - 1);*/ -/* b = (B_VAL(src_ptr)) >> (8 - 1);*/ -/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith ) && (r < 0x01)) r++;*/ -/* if (((G_VAL(src_ptr) - (g << (8 - 1))) >= dith ) && (g < 0x01)) g++;*/ -/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith ) && (b < 0x01)) b++;*/ - - r = (R_VAL(src_ptr)) * 1 / 255; - if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith ) && (r < 0x01)) r++; - g = (G_VAL(src_ptr)) * 1 / 255; - if (((G_VAL(src_ptr) - (g * 255 / 1)) >= dith ) && (g < 0x01)) g++; - b = (B_VAL(src_ptr)) * 1 / 255; - if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith ) && (b < 0x01)) b++; - - *dst_ptr = pal[(r << 2) | (g << 1) | (b)]; - - CONVERT_LOOP_END_ROT_0(); -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h b/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h deleted file mode 100644 index edb3a89..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _EVAS_CONVERT_RGB_8_H -#define _EVAS_CONVERT_RGB_8_H - - -void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); -void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - - -#endif /* _EVAS_CONVERT_RGB_8_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c deleted file mode 100644 index 000cb01..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c +++ /dev/null @@ -1,1258 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_yuv.h" - -#if defined BUILD_MMX || defined BUILD_SSE -# include "evas_mmx.h" -#endif - -#if defined HAVE_ALTIVEC_H -# include -#ifdef CONFIG_DARWIN -#define AVV(x...) (x) -#else -#define AVV(x...) {x} -#endif - -#endif - -#ifdef BUILD_CONVERT_YUV - -static void _evas_yuv_init (void); -static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h); -#ifdef BUILD_ALTIVEC -static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h); -#endif -static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_yuy2torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_nv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); -static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h); - -#define CRV 104595 -#define CBU 132251 -#define CGU 25624 -#define CGV 53280 -#define YMUL 76283 -#define OFF 32768 -#define BITRES 16 - -/* calculation float resolution in bits */ -/* ie RES = 6 is 10.6 fixed point */ -/* RES = 8 is 8.8 fixed point */ -/* RES = 4 is 12.4 fixed point */ -/* NB: going above 6 will lead to overflow... :( */ -#define RES 6 - -#define RZ(i) (i >> (BITRES - RES)) -#define FOUR(i) {i, i, i, i} - -#if defined BUILD_MMX || defined BUILD_SSE -__attribute__ ((aligned (8))) const volatile unsigned short _const_crvcrv[4] = FOUR(RZ(CRV)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_cbucbu[4] = FOUR(RZ(CBU)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_cgucgu[4] = FOUR(RZ(CGU)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_cgvcgv[4] = FOUR(RZ(CGV)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_ymul [4] = FOUR(RZ(YMUL)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_128 [4] = FOUR(128); -__attribute__ ((aligned (8))) const volatile unsigned short _const_32 [4] = FOUR(RZ(OFF)); -__attribute__ ((aligned (8))) const volatile unsigned short _const_16 [4] = FOUR(16); -__attribute__ ((aligned (8))) const volatile unsigned short _const_ff [4] = FOUR(-1); - -#define CONST_CRVCRV *_const_crvcrv -#define CONST_CBUCBU *_const_cbucbu -#define CONST_CGUCGU *_const_cgucgu -#define CONST_CGVCGV *_const_cgvcgv -#define CONST_YMUL *_const_ymul -#define CONST_128 *_const_128 -#define CONST_32 *_const_32 -#define CONST_16 *_const_16 -#define CONST_FF *_const_ff - -/* for C non aligned cleanup */ -const int _crv = RZ(CRV); /* 1.596 */ -const int _cbu = RZ(CBU); /* 2.018 */ -const int _cgu = RZ(CGU); /* 0.391 */ -const int _cgv = RZ(CGV); /* 0.813 */ - -#endif - -#ifdef BUILD_ALTIVEC -#ifdef __VEC__ -const vector unsigned short res = AVV(RES); -const vector signed short crv = AVV(RZ(CRV)); -const vector signed short cbu = AVV(RZ(CBU)); -const vector signed short cgu = AVV(RZ(CGU)); -const vector signed short cgv = AVV(RZ(CGV)); -const vector signed short ymul = AVV(RZ(YMUL)); -const vector signed short c128 = AVV(128); -const vector signed short c32 = AVV(RZ(OFF)); -const vector signed short c16 = AVV(16); -const vector unsigned char zero = AVV(0); -const vector signed short maxchar = AVV(255); -const vector unsigned char pickrg1 = AVV(0, 0x1, 0x11, 0, - 0, 0x3, 0x13, 0, - 0, 0x5, 0x15, 0, - 0, 0x7, 0x17, 0); -const vector unsigned char pickrg2 = AVV(0, 0x9, 0x19, 0, - 0, 0xb, 0x1b, 0, - 0, 0xd, 0x1d, 0, - 0, 0xf, 0x1f, 0); -const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11, - 0x7, 0x5, 0x6, 0x13, - 0xb, 0x9, 0xa, 0x15, - 0xf, 0xd, 0xe, 0x17); -const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19, - 0x7, 0x5, 0x6, 0x1b, - 0xb, 0x9, 0xa, 0x1d, - 0xf, 0xd, 0xe, 0x1f); -#endif -#endif - -#ifdef BUILD_C - -/* shortcut speedup lookup-tables */ -static short _v1164[256]; -static short _v1596[256]; -static short _v813[256]; -static short _v391[256]; -static short _v2018[256]; - -static unsigned char _clip_lut[1024]; -#define LUT_CLIP(i) ((_clip_lut+384)[(i)]) - -#define CMP_CLIP(i) ((i&256)? (~(i>>10)) : i); - -static int initted = 0; - -#endif - -void -evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) -{ - int mmx, sse, sse2; - -#if defined BUILD_MMX || defined BUILD_SSE - evas_common_cpu_can_do(&mmx, &sse, &sse2); -#endif -#ifndef BUILD_SSE - sse = 0; - sse2 = 0; -#endif -#ifndef BUILD_MMX - mmx = 0; -#endif - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) - _evas_yv12torgb_sse(src, dst, w, h); - else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - _evas_yv12torgb_mmx(src, dst, w, h); -#ifdef BUILD_ALTIVEC - if (evas_common_cpu_has_feature(CPU_FEATURE_ALTIVEC)) - _evas_yv12torgb_altivec(src, dst, w, h); -#endif - else - { -#ifdef BUILD_C - if (!initted) _evas_yuv_init(); - initted = 1; - /* FIXME: diz may be faster sometimes */ - _evas_yv12torgb_raster(src, dst, w, h); -#endif - } -} - -/* Thanks to Diz for this code. i've munged it a little and turned it into */ -/* inline macros. I tried beating it with a different algorithm using MMX */ -/* but failed. So here we are. This is the fastest YUV->RGB i know of for */ -/* x86. It has an issue that it doesn't convert colours accurately so the */ -/* image looks a little "yellowy". This is a result of only 10.6 fixed point */ -/* resolution as opposed to 16.16 in the C code. This could be fixed by */ -/* processing half the number of pixels per cycle and going up to 32bits */ -/* per element during compute, but it would all but negate the speedup */ -/* from mmx I think :( It might be possible to use SSE and SSE2 here, but */ -/* I haven't tried yet. Let's see. */ - -/* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */ -/* algorithm, same constants, same all over actually, except it actually */ -/* does a few extra memory accesses that this one doesn't, so in theory */ -/* this code should be faster. In the end it's all just an mmx version of */ -/* the reference implimentation done with fixed point math */ - -static void -_evas_yv12torgb_sse(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_SSE - int xx, yy; - register unsigned char *yp1, *up, *vp; - unsigned char *dp1; - - /* destination pointers */ - dp1 = rgb; - - for (yy = 0; yy < h; yy++) - { - /* plane pointers */ - yp1 = yuv[yy]; - up = yuv[h + (yy / 2)]; - vp = yuv[h + (h / 2) + (yy / 2)]; - for (xx = 0; xx < (w - 7); xx += 8) - { - movd_m2r(*up, mm3); - movd_m2r(*vp, mm2); - movq_m2r(*yp1, mm0); - - pxor_r2r(mm7, mm7); - punpcklbw_r2r(mm7, mm2); - punpcklbw_r2r(mm7, mm3); - - movq_r2r(mm0, mm1); - psrlw_i2r(8, mm0); - psllw_i2r(8, mm1); - psrlw_i2r(8, mm1); - - movq_m2r(CONST_16, mm4); - psubsw_r2r(mm4, mm0); - psubsw_r2r(mm4, mm1); - - movq_m2r(CONST_128, mm5); - psubsw_r2r(mm5, mm2); - psubsw_r2r(mm5, mm3); - - movq_m2r(CONST_YMUL, mm4); - pmullw_r2r(mm4, mm0); - pmullw_r2r(mm4, mm1); - - movq_m2r(CONST_CRVCRV, mm7); - pmullw_r2r(mm3, mm7); - movq_m2r(CONST_CBUCBU, mm6); - pmullw_r2r(mm2, mm6); - movq_m2r(CONST_CGUCGU, mm5); - pmullw_r2r(mm2, mm5); - movq_m2r(CONST_CGVCGV, mm4); - pmullw_r2r(mm3, mm4); - - movq_r2r(mm0, mm2); - paddsw_r2r(mm7, mm2); - paddsw_r2r(mm1, mm7); - - psraw_i2r(RES, mm2); - psraw_i2r(RES, mm7); - packuswb_r2r(mm7, mm2); - - pxor_r2r(mm7, mm7); - movq_r2r(mm2, mm3); - punpckhbw_r2r(mm7, mm2); - punpcklbw_r2r(mm3, mm7); - por_r2r(mm7, mm2); - - movq_r2r(mm0, mm3); - psubsw_r2r(mm5, mm3); - psubsw_r2r(mm4, mm3); - paddsw_m2r(CONST_32, mm3); - - movq_r2r(mm1, mm7); - psubsw_r2r(mm5, mm7); - psubsw_r2r(mm4, mm7); - paddsw_m2r(CONST_32, mm7); - - psraw_i2r(RES, mm3); - psraw_i2r(RES, mm7); - packuswb_r2r(mm7, mm3); - - pxor_r2r(mm7, mm7); - movq_r2r(mm3, mm4); - punpckhbw_r2r(mm7, mm3); - punpcklbw_r2r(mm4, mm7); - por_r2r(mm7, mm3); - - movq_m2r(CONST_32, mm4); - paddsw_r2r(mm6, mm0); - paddsw_r2r(mm6, mm1); - paddsw_r2r(mm4, mm0); - paddsw_r2r(mm4, mm1); - psraw_i2r(RES, mm0); - psraw_i2r(RES, mm1); - packuswb_r2r(mm1, mm0); - - pxor_r2r(mm7, mm7); - movq_r2r(mm0, mm5); - punpckhbw_r2r(mm7, mm0); - punpcklbw_r2r(mm5, mm7); - por_r2r(mm7, mm0); - - movq_m2r(CONST_FF, mm1); - movq_r2r(mm0, mm5); - movq_r2r(mm3, mm6); - movq_r2r(mm2, mm7); - punpckhbw_r2r(mm3, mm2); - punpcklbw_r2r(mm6, mm7); - punpckhbw_r2r(mm1, mm0); - punpcklbw_r2r(mm1, mm5); - - movq_r2r(mm7, mm1); - punpckhwd_r2r(mm5, mm7); - punpcklwd_r2r(mm5, mm1); - - movq_r2r(mm2, mm4); - punpckhwd_r2r(mm0, mm2); - punpcklwd_r2r(mm0, mm4); - - movntq_r2m(mm1, *(dp1)); - movntq_r2m(mm7, *(dp1 + 8)); - movntq_r2m(mm4, *(dp1 + 16)); - movntq_r2m(mm2, *(dp1 + 24)); - - yp1 += 8; - up += 4; - vp += 4; - dp1 += 8 * 4; - } - /* cleanup pixles that arent a multiple of 8 pixels wide */ - if (xx < w) - { - int y, u, v, r, g, b; - - for (; xx < w; xx += 2) - { - u = (*up++) - 128; - v = (*vp++) - 128; - - y = RZ(YMUL) * ((*yp1++) - 16); - r = LUT_CLIP((y + (_crv * v)) >> RES); - g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); - b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - - y = RZ(YMUL) * ((*yp1++) - 16); - r = LUT_CLIP((y + (_crv * v)) >> RES); - g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); - b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - } - } - } - emms(); -#else - _evas_yv12torgb_mmx(yuv, rgb, w, h); -#endif -} - -static void -_evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_MMX - int xx, yy; - register unsigned char *yp1, *up, *vp; - unsigned char *dp1; - - /* destination pointers */ - dp1 = rgb; - - for (yy = 0; yy < h; yy++) - { - /* plane pointers */ - yp1 = yuv[yy]; - up = yuv[h + (yy / 2)]; - vp = yuv[h + (h / 2) + (yy / 2)]; - for (xx = 0; xx < (w - 7); xx += 8) - { - movd_m2r(*up, mm3); - movd_m2r(*vp, mm2); - movq_m2r(*yp1, mm0); - - pxor_r2r(mm7, mm7); - punpcklbw_r2r(mm7, mm2); - punpcklbw_r2r(mm7, mm3); - - movq_r2r(mm0, mm1); - psrlw_i2r(8, mm0); - psllw_i2r(8, mm1); - psrlw_i2r(8, mm1); - - movq_m2r(CONST_16, mm4); - psubsw_r2r(mm4, mm0); - psubsw_r2r(mm4, mm1); - - movq_m2r(CONST_128, mm5); - psubsw_r2r(mm5, mm2); - psubsw_r2r(mm5, mm3); - - movq_m2r(CONST_YMUL, mm4); - pmullw_r2r(mm4, mm0); - pmullw_r2r(mm4, mm1); - - movq_m2r(CONST_CRVCRV, mm7); - pmullw_r2r(mm3, mm7); - movq_m2r(CONST_CBUCBU, mm6); - pmullw_r2r(mm2, mm6); - movq_m2r(CONST_CGUCGU, mm5); - pmullw_r2r(mm2, mm5); - movq_m2r(CONST_CGVCGV, mm4); - pmullw_r2r(mm3, mm4); - - movq_r2r(mm0, mm2); - paddsw_r2r(mm7, mm2); - paddsw_r2r(mm1, mm7); - - psraw_i2r(RES, mm2); - psraw_i2r(RES, mm7); - packuswb_r2r(mm7, mm2); - - pxor_r2r(mm7, mm7); - movq_r2r(mm2, mm3); - punpckhbw_r2r(mm7, mm2); - punpcklbw_r2r(mm3, mm7); - por_r2r(mm7, mm2); - - movq_r2r(mm0, mm3); - psubsw_r2r(mm5, mm3); - psubsw_r2r(mm4, mm3); - paddsw_m2r(CONST_32, mm3); - - movq_r2r(mm1, mm7); - psubsw_r2r(mm5, mm7); - psubsw_r2r(mm4, mm7); - paddsw_m2r(CONST_32, mm7); - - psraw_i2r(RES, mm3); - psraw_i2r(RES, mm7); - packuswb_r2r(mm7, mm3); - - pxor_r2r(mm7, mm7); - movq_r2r(mm3, mm4); - punpckhbw_r2r(mm7, mm3); - punpcklbw_r2r(mm4, mm7); - por_r2r(mm7, mm3); - - movq_m2r(CONST_32, mm4); - paddsw_r2r(mm6, mm0); - paddsw_r2r(mm6, mm1); - paddsw_r2r(mm4, mm0); - paddsw_r2r(mm4, mm1); - psraw_i2r(RES, mm0); - psraw_i2r(RES, mm1); - packuswb_r2r(mm1, mm0); - - pxor_r2r(mm7, mm7); - movq_r2r(mm0, mm5); - punpckhbw_r2r(mm7, mm0); - punpcklbw_r2r(mm5, mm7); - por_r2r(mm7, mm0); - - movq_m2r(CONST_FF, mm1); - movq_r2r(mm0, mm5); - movq_r2r(mm3, mm6); - movq_r2r(mm2, mm7); - punpckhbw_r2r(mm3, mm2); - punpcklbw_r2r(mm6, mm7); - punpckhbw_r2r(mm1, mm0); - punpcklbw_r2r(mm1, mm5); - - movq_r2r(mm7, mm1); - punpckhwd_r2r(mm5, mm7); - punpcklwd_r2r(mm5, mm1); - - movq_r2r(mm2, mm4); - punpckhwd_r2r(mm0, mm2); - punpcklwd_r2r(mm0, mm4); - - movq_r2m(mm1, *(dp1)); - movq_r2m(mm7, *(dp1 + 8)); - movq_r2m(mm4, *(dp1 + 16)); - movq_r2m(mm2, *(dp1 + 24)); - - yp1 += 8; - up += 4; - vp += 4; - dp1 += 8 * 4; - } - /* cleanup pixles that arent a multiple of 8 pixels wide */ - if (xx < w) - { - int y, u, v, r, g, b; - - for (; xx < w; xx += 2) - { - u = (*up++) - 128; - v = (*vp++) - 128; - - y = RZ(YMUL) * ((*yp1++) - 16); - r = LUT_CLIP((y + (_crv * v)) >> RES); - g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); - b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - - y = RZ(YMUL) * ((*yp1++) - 16); - r = LUT_CLIP((y + (_crv * v)) >> RES); - g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); - b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - } - } - } - emms(); -#else - _evas_yv12torgb_raster(yuv, rgb, w, h); -#endif -} - -#ifdef BUILD_ALTIVEC -static void -_evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef __VEC__ - int xx, yy; - int w2, h2; - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1, *dp2; - vector signed short y, u, v; - vector signed short r, g, b; - vector signed short tmp1, tmp2, tmp3; - vector unsigned char yperm, uperm, vperm, rgb1, rgb2; - vector unsigned char alpha; - - /* handy halved w & h */ - w2 = w / 2; - h2 = h / 2; - /* plane pointers */ - yp1 = yuv; - yp2 = yuv + w; - up = yuv + (w * h); - vp = up + (w2 * h2); - /* destination pointers */ - dp1 = rgb; - dp2 = rgb + (w * 4); - - alpha = vec_mergeh((vector unsigned char)AVV(255), zero); - alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha, - (vector unsigned short)zero); - - for (yy = 0; yy < h2; yy++) - { - for (xx = 0; xx < w2; xx += 4) - { -/* Cycles */ - /* - * Load 4 y and 4 u & v pixels for the 8x2 pixel block. - */ -/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); -/* 3 */ tmp1 = (vector signed short)vec_lde(0, (unsigned int *)up); -/* 3 */ tmp2 = (vector signed short)vec_lde(0, (unsigned int *)vp); - - /* Prepare for aligning the data in their vectors */ -/* 3 */ yperm = vec_lvsl(0, yp1); -/* 3 */ uperm = vec_lvsl(0, up); -/* 3 */ vperm = vec_lvsl(0, vp); - yp1 += 4; - - /* Save y and load the next 4 y pixels for a total of 8 */ -/* 2 */ y = vec_perm(tmp3, tmp3, yperm); -/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); - - /* Setup and calculate the 4 u pixels */ -/* 2 */ tmp1 = vec_perm(tmp1, tmp1, uperm); -/* 2 */ tmp2 = vec_perm(tmp2, tmp2, vperm); - - /* Avoid dependency stalls on yperm and calculate the 4 u values */ -/* 3 */ yperm = vec_lvsr(12, yp1); -/* 1 */ tmp1 = (vector signed short)vec_mergeh((vector unsigned char)tmp1, - (vector unsigned char)tmp1); -/* 1 */ u = (vector signed short)vec_mergeh(zero, - (vector unsigned char)tmp1); - -/* 1 */ u = vec_sub(u, c128); -/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); - - /* Setup and calculate the 4 v values */ -/* 1 */ tmp2 = (vector signed short)vec_mergeh((vector unsigned char)tmp2, - (vector unsigned char)tmp2); -/* 1 */ v = (vector signed short)vec_mergeh(zero, - (vector unsigned char)tmp2); -/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); -/* 1 */ v = vec_sub(v, c128); - - /* Move the data into y and start loading the next 4 pixels */ -/* 1 */ y = (vector signed short)vec_mergeh(zero, - (vector unsigned char)y); -/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, - (vector unsigned char)tmp3); -/* 1 */ y = vec_or(y, tmp3); - - /* Finish calculating y */ -/* 1 */ y = vec_sub(y, c16); -/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); - - /* Perform non-dependent multiplies first. */ -/* 4 */ tmp1 = vec_mladd(crv, v, y); -/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); -/* 4 */ tmp3 = vec_mladd(cbu, u, y); - - /* Calculate rgb values */ -/* 1 */ r = vec_sra(tmp1, res); - -/* 1 */ tmp2 = vec_sub(y, tmp2); -/* 1 */ tmp2 = vec_add(tmp2, c32); -/* 1 */ g = vec_sra(tmp2, res); - -/* 1 */ tmp3 = vec_add(tmp3, c32); -/* 1 */ b = vec_sra(tmp3, res); - - /* Bound to 0 <= x <= 255 */ -/* 1 */ r = vec_min(r, maxchar); -/* 1 */ g = vec_min(g, maxchar); -/* 1 */ b = vec_min(b, maxchar); -/* 1 */ r = vec_max(r, (vector signed short)zero); -/* 1 */ g = vec_max(g, (vector signed short)zero); -/* 1 */ b = vec_max(b, (vector signed short)zero); - - /* Combine r, g and b. */ -/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, - pickrg1); -/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, - pickrg2); - -/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); -/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); - -/* 1 */ rgb1 = vec_or(alpha, rgb1); -/* 1 */ rgb2 = vec_or(alpha, rgb2); - -/* 3 */ vec_stl(rgb1, 0, dp1); - dp1 += 16; -/* 3 */ vec_stl(rgb2, 0, dp1); - - /* - * Begin the second row calculations - */ - - /* - * Load 4 y pixels for the 8x2 pixel block. - */ -/* 3 */ yperm = vec_lvsl(0, yp2); -/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); - yp2 += 4; - - /* Save y and load the next 4 y pixels for a total of 8 */ -/* 2 */ y = vec_perm(tmp3, tmp3, yperm); -/* 3 */ yperm = vec_lvsr(12, yp2); -/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); -/* 1 */ y = (vector signed short)vec_mergeh(zero, - (vector unsigned char)y); - - /* Avoid dependency stalls on yperm */ -/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); -/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, - (vector unsigned char)tmp3); -/* 1 */ y = vec_or(y, tmp3); - - /* Start the calculation for g */ -/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); - - /* Finish calculating y */ -/* 1 */ y = vec_sub(y, c16); -/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); - - /* Perform non-dependent multiplies first. */ -/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); -/* 4 */ tmp1 = vec_mladd(crv, v, y); -/* 4 */ tmp3 = vec_mladd(cbu, u, y); - - /* Calculate rgb values */ -/* 1 */ r = vec_sra(tmp1, res); - -/* 1 */ tmp2 = vec_sub(y, tmp2); -/* 1 */ tmp2 = vec_add(tmp2, c32); -/* 1 */ g = vec_sra(tmp2, res); - -/* 1 */ tmp3 = vec_add(tmp3, c32); -/* 1 */ b = vec_sra(tmp3, res); - - /* Bound to 0 <= x <= 255 */ -/* 1 */ r = vec_min(r, maxchar); -/* 1 */ g = vec_min(g, maxchar); -/* 1 */ b = vec_min(b, maxchar); -/* 1 */ r = vec_max(r, (vector signed short)zero); -/* 1 */ g = vec_max(g, (vector signed short)zero); -/* 1 */ b = vec_max(b, (vector signed short)zero); - - /* Combine r, g and b. */ -/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, - pickrg1); -/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, - pickrg2); - -/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); -/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); - -/* 1 */ rgb1 = vec_or(alpha, rgb1); -/* 1 */ rgb2 = vec_or(alpha, rgb2); - -/* 3 */ vec_stl(rgb1, 0, dp2); - dp2 += 16; -/* 3 */ vec_stl(rgb2, 0, dp2); - - /* Increment the YUV data pointers to the next set of pixels. */ - yp1 += 4; - yp2 += 4; - up += 4; - vp += 4; - - /* Move the destination pointers to the next set of pixels. */ - dp1 += 16; - dp2 += 16; - } - - /* jump down one line since we are doing 2 at once */ - yp1 += w; - yp2 += w; - dp1 += (w * 4); - dp2 += (w * 4); - } -#else - _evas_yv12torgb_diz(yuv, rgb, w, h); -#endif -} -#endif - -static void -_evas_yuv_init(void) -{ -#ifdef BUILD_C - int i; - - for (i = 0; i < 256; i++) - { - _v1164[i] = (int)(((float)(i - 16 )) * 1.164); - - _v1596[i] = (int)(((float)(i - 128)) * 1.596); - _v813[i] = (int)(((float)(i - 128)) * 0.813); - - _v391[i] = (int)(((float)(i - 128)) * 0.391); - _v2018[i] = (int)(((float)(i - 128)) * 2.018); - } - - for (i = -384; i < 640; i++) - { - _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i; - } -#endif -} - -#ifdef BUILD_ALTIVEC -static void -_evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_C - int xx, yy; - int y, u, v, r, g, b; - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1, *dp2; - int crv, cbu, cgu, cgv; - - /* destination pointers */ - dp1 = rgb; - dp2 = rgb + (w * 4); - - crv = CRV; /* 1.596 */ - cbu = CBU; /* 2.018 */ - cgu = CGU; /* 0.391 */ - cgv = CGV; /* 0.813 */ - - for (yy = 0; yy < h; yy += 2) - { - /* plane pointers */ - yp1 = yuv[yy]; - yp2 = yuv[yy + 1]; - up = yuv[h + (yy / 2)]; - vp = yuv[h + (h / 2) + (yy / 2)]; - for (xx = 0; xx < w; xx += 2) - { - /* collect u & v for 2x2 pixel block */ - u = (*up++) - 128; - v = (*vp++) - 128; - - /* do the top 2 pixels of the 2x2 block which shared u & v */ - /* yuv to rgb */ - y = YMUL * ((*yp1++) - 16); - r = LUT_CLIP((y + (crv * v)) >> 16); - g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); - b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - - /* yuv to rgb */ - y = YMUL * ((*yp1++) - 16); - r = LUT_CLIP((y + (crv * v)) >> 16); - g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); - b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); - - dp1 += 4; - - /* do the bottom 2 pixels */ - /* yuv to rgb */ - y = YMUL * ((*yp2++) - 16); - r = LUT_CLIP((y + (crv * v)) >> 16); - g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); - b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); - *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); - - dp2 += 4; - - /* yuv to rgb */ - y = YMUL * ((*yp2++) - 16); - r = LUT_CLIP((y + (crv * v)) >> 16); - g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); - b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); - *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); - - dp2 += 4; - } - /* jump down one line since we are doing 2 at once */ - dp1 += (w * 4); - dp2 += (w * 4); - } -#endif -} -#endif - -static void -_evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_C - int xx, yy; - int y, u, v; - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1, *dp2; - - /* destination pointers */ - dp1 = rgb; - dp2 = rgb + (w * 4); - - for (yy = 0; yy < h; yy += 2) - { - /* plane pointers */ - yp1 = yuv[yy]; - yp2 = yuv[yy + 1]; - up = yuv[h + (yy / 2)]; - vp = yuv[h + (h / 2) + (yy / 2)]; - for (xx = 0; xx < w; xx += 2) - { - int vmu; - - /* collect u & v for 2x2 pixel block */ - u = *up++; - v = *vp++; - - /* save lookups */ - vmu = _v813[v] + _v391[u]; - u = _v2018[u]; - v = _v1596[v]; - - /* do the top 2 pixels of the 2x2 block which shared u & v */ - /* yuv to rgb */ - y = _v1164[*yp1++]; - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp1 += 4; - - /* yuv to rgb */ - y = _v1164[*yp1++]; - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp1 += 4; - - /* do the bottom 2 pixels */ - /* yuv to rgb */ - y = _v1164[*yp2++]; - *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp2 += 4; - - /* yuv to rgb */ - y = _v1164[*yp2++]; - *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp2 += 4; - } - /* jump down one line since we are doing 2 at once */ - dp1 += (w * 4); - dp2 += (w * 4); - } -#endif -} - -void -evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) -{ -#ifdef BUILD_C - if (!initted) _evas_yuv_init(); - initted = 1; - _evas_yuy2torgb_raster(src, dst, w, h); -#endif -} - -void -evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) -{ -#ifdef BUILD_C - if (!initted) _evas_yuv_init(); - initted = 1; - _evas_nv12torgb_raster(src, dst, w, h); -#endif -} - -void -evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) -{ -#ifdef BUILD_C - if (initted) _evas_yuv_init(); - initted = 1; - _evas_nv12tiledtorgb_raster(src, dst, w, h); -#endif -} - -static void -_evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_C - int xx, yy; - int y, u, v; - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1; - - dp1 = rgb; - - /* destination pointers */ - for (yy = 0; yy < h; yy++) - { - /* plane pointers */ - unsigned char *line; - - line = yuv[yy]; - yp1 = line + 0; - up = line + 1; - yp2 = line + 2; - vp = line + 3; - - for (xx = 0; xx < w; xx += 2) - { - int vmu; - - /* collect u & v for 2 pixels block */ - u = *up; - v = *vp; - - /* save lookups */ - vmu = _v813[v] + _v391[u]; - u = _v2018[u]; - v = _v1596[v]; - - /* do the top 2 pixels of the 2x2 block which shared u & v */ - /* yuv to rgb */ - y = _v1164[*yp1]; - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp1 += 4; - - /* yuv to rgb */ - y = _v1164[*yp2]; - *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); - - dp1 += 4; - - yp1 += 4; yp2 += 4; up += 4; vp += 4; - } - } -#endif -} - -#ifdef BUILD_C -static inline void -_evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp, - unsigned char *dp1, unsigned char *dp2) -{ - int y, u, v; - int vmu; - int rgb; - - /* collect u & v for 4 pixels block */ - u = *up; - v = *vp; - - /* save lookups */ -#ifdef MEM_BP - vmu = _v813[v] + _v391[u]; - u = _v2018[u]; - v = _v1596[v]; -#else - u -= 128; - v -= 128; - vmu = v * CGV + u * CGU; - u = u * CBU; - v = v * CRV; -#endif - - /* do the top 2 pixels of the 2x2 block which shared u & v */ - /* yuv to rgb */ -#ifdef MEM_BP - y = _v1164[*yp1]; - rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); -#else - y = (*yp1 - 16 ) * YMUL; - rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), - LUT_CLIP(((y - vmu + OFF) >> 16)), - LUT_CLIP(((y + u + OFF) >> 16))); -#endif - *((DATA32 *) dp1) = 0xff000000 + rgb; - - dp1 += 4; yp1++; - - /* yuv to rgb */ -#ifdef MEM_BP - y = _v1164[*yp1]; - rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); -#else - y = (*yp1 - 16 ) * YMUL; - rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), - LUT_CLIP(((y - vmu + OFF) >> 16)), - LUT_CLIP(((y + u + OFF) >> 16))); -#endif - *((DATA32 *) dp1) = 0xff000000 + rgb; - - /* do the bottom 2 pixels of the 2x2 block which shared u & v */ - /* yuv to rgb */ -#ifdef MEM_BP - y = _v1164[*yp2]; - rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); -#else - y = (*yp2 - 16 ) * YMUL; - rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), - LUT_CLIP(((y - vmu + OFF) >> 16)), - LUT_CLIP(((y + u + OFF) >> 16))); -#endif - *((DATA32 *) dp2) = 0xff000000 + rgb; - - dp2 += 4; yp2++; - - /* yuv to rgb */ -#ifdef MEM_BP - y = _v1164[*yp2]; - rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); -#else - y = (*yp2 - 16 ) * YMUL; - rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), - LUT_CLIP(((y - vmu + OFF) >> 16)), - LUT_CLIP(((y + u + OFF) >> 16))); -#endif - *((DATA32 *) dp2) = 0xff000000 + rgb; -} -#endif - -static void -_evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_C - -#define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2) \ - { \ - int i; \ - int j; \ - \ - for (i = 0; i < 32; i += 2) \ - { \ - for (j = 0; j < 64; j += 2) \ - { \ - _evas_yuv2rgb_420_raster(YP1, YP2, UP, VP, DP1, DP2); \ - \ - /* the previous call just rendered 2 pixels per lines */ \ - DP1 += 8; DP2 += 8; \ - \ - /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ \ - YP1 += 2; YP2 += 2; UP += 2; VP += 2; \ - } \ - \ - DP1 += sizeof (int) * ((w << 1) - 64); \ - DP2 += sizeof (int) * ((w << 1) - 64); \ - YP1 += 64; \ - YP2 += 64; \ - } \ - } - - /* One macro block is 32 lines of Y and 16 lines of UV */ - const int offset_value[2] = { 0, 64 * 16 }; - int mb_x, mb_y, mb_w, mb_h; - int base_h; - int uv_x, uv_step; - int stride; - - /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ - - /* The layout of the Y macroblock order in RGB non tiled space : */ - /* --------------------------------------------------- */ - /* | 0 | 1 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | */ - /* --------------------------------------------------- */ - /* | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | */ - /* --------------------------------------------------- */ - /* | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | */ - /* --------------------------------------------------- */ - /* | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 38 | 39 | */ - /* --------------------------------------------------- */ - /* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | */ - /* --------------------------------------------------- */ - /* The layout of the UV macroblock order in the same RGB non tiled space : */ - /* --------------------------------------------------- */ - /* | | | | | | | | | | | */ - /* - 0 - 1 - 6 - 7 - 8 - 9 - 14 - 15 - 16 - 17 - */ - /* | | | | | | | | | | | */ - /* --------------------------------------------------- */ - /* | | | | | | | | | | | */ - /* - 2 - 3 - 4 - 5 - 10 - 11 - 12 - 13 - 18 - 19 - */ - /* | | | | | | | | | | | */ - /* --------------------------------------------------- */ - /* | | | | | | | | | | | */ - /* - 20 - 21 - 22 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - */ - - /* the number of macroblock should be a multiple of 64x32 */ - mb_w = w / 64; - mb_h = h / 32; - - base_h = (mb_h >> 1) + (mb_h & 0x1); - stride = w * sizeof (int); - - uv_x = 0; - - /* In this format we linearize macroblock on two line to form a Z and it's invert */ - for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) - { - int step = 2; - int offset = 0; - int x = 0; - int rmb_x = 0; - int ry[2]; - - ry[0] = mb_y * 2 * 32 * stride; - ry[1] = ry[0] + 32 * stride; - - uv_step = (mb_y & 0x1) == 0 ? 4 : 0; - uv_x = (mb_y & 0x1) == 0 ? 0 : 2 * 64 * 32; - - for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) - { - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1, *dp2; - - dp1 = rgb + x + ry[offset]; - dp2 = dp1 + stride; - - yp1 = yuv[mb_y] + rmb_x; - yp2 = yp1 + 64; - - /* UV plane is two time less bigger in pixel count, but it old two bytes each times */ - up = yuv[(mb_y >> 1) + base_h] + uv_x + offset_value[offset]; - vp = up + 1; - - HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); - - step++; - if ((step & 0x3) == 0) - { - offset = 1 - offset; - x -= 64 * sizeof (int); - uv_x -= 64 * 32; - } - else - { - x += 64 * sizeof (int); - uv_x += 64 * 32; - } - - uv_step++; - if (uv_step == 8) - { - uv_step = 0; - uv_x += 4 * 64 * 32; - } - } - } - - if (mb_h & 0x1) - { - int x = 0; - int ry; - - ry = mb_y << 1; - - uv_step = 0; - uv_x = 0; - - for (mb_x = 0; mb_x < mb_w; mb_x++, x++, uv_x++) - { - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1, *dp2; - - dp1 = rgb + (x * 64 + (ry * 32 * w)) * sizeof (int); - dp2 = dp1 + sizeof (int) * w; - - yp1 = yuv[mb_y] + mb_x * 64 * 32; - yp2 = yp1 + 64; - - up = yuv[mb_y / 2 + base_h] + uv_x * 64 * 32; - vp = up + 1; - - HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); - } - } -#endif -} - -static void -_evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) -{ -#ifdef BUILD_C - int xx, yy; - unsigned char *yp1, *yp2, *up, *vp; - unsigned char *dp1; - unsigned char *dp2; - - dp1 = rgb; - dp2 = dp1 + sizeof (int) * w; - - for (yy = 0; yy < h; yy++) - { - yp1 = yuv[yy++]; - yp2 = yuv[yy]; - - up = yuv[h + (yy >> 1)]; - vp = up + 1; - - for (xx = 0; xx < w; xx += 2) - { - _evas_yuv2rgb_420_raster(yp1, yp2, up, vp, dp1, dp2); - - /* the previous call just rendered 2 pixels per lines */ - dp1 += 8; dp2 += 8; - - /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ - yp1 += 2; yp2 += 2; up += 2; vp += 2; - } - - /* jump one line */ - dp1 += sizeof (int) * w; - dp2 += sizeof (int) * w; - yp1 += w; - yp2 += w; - } -#endif -} - -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.h b/libraries/evas/src/lib/engines/common/evas_convert_yuv.h deleted file mode 100644 index b598807..0000000 --- a/libraries/evas/src/lib/engines/common/evas_convert_yuv.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _EVAS_CONVERT_YUV_H -#define _EVAS_CONVERT_YUV_H - -EAPI void evas_common_convert_yuv_420p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); -EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); -EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); -EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); - -#endif /* _EVAS_CONVERT_YUV_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c deleted file mode 100644 index fe90c5b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_cpu.c +++ /dev/null @@ -1,274 +0,0 @@ -#include "evas_common.h" -#if defined BUILD_MMX || defined BUILD_SSE -#include "evas_mmx.h" -#endif - -#if defined BUILD_SSE3 -#include -#endif - -#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) -#include -#include -#include - -static sigjmp_buf detect_buf; -#endif - -static int cpu_feature_mask = 0; - -#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) -static void evas_common_cpu_catch_ill(int sig); -static void evas_common_cpu_catch_segv(int sig); - -static void -evas_common_cpu_catch_ill(int sig __UNUSED__) -{ - siglongjmp(detect_buf, 1); -} - -static void -evas_common_cpu_catch_segv(int sig __UNUSED__) -{ - siglongjmp(detect_buf, 1); -} -#endif - -void -evas_common_cpu_mmx_test(void) -{ -#ifdef BUILD_MMX - pxor_r2r(mm4, mm4); -#endif -} - -void -evas_common_cpu_mmx2_test(void) -{ -#ifdef BUILD_MMX - char data[16]; - - data[0] = 0; - mmx_r2m(movntq, mm0, data); - data[0] = 0; -#endif -} - -void -evas_common_cpu_sse_test(void) -{ -#ifdef BUILD_SSE - int blah[16]; - - movntq_r2m(mm0, blah); -#endif -} - -void evas_common_op_sse3_test(void); - -void -evas_common_cpu_sse3_test(void) -{ -#ifdef BUILD_SSE3 - evas_common_op_sse3_test(); -#endif -} - -#ifdef BUILD_ALTIVEC -void -evas_common_cpu_altivec_test(void) -{ -#ifdef __POWERPC__ -#ifdef __VEC__ - vector unsigned int zero; - - zero = vec_splat_u32(0); -#endif /* __VEC__ */ -#endif /* __POWERPC__ */ -} -#endif /* BUILD_ALTIVEC */ - -void -evas_common_cpu_neon_test(void) -{ -//#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70) -#ifdef BUILD_NEON - asm volatile ( - ".fpu neon \n\t" - "vqadd.u8 d0, d1, d0\n" - : /* Out */ - : /* In */ - : /* Clobbered */ - "d0", "d1" - ); -#endif -//#endif -} - -void -evas_common_cpu_vis_test(void) -{ -#ifdef __SPARC__ -#endif /* __SPARC__ */ -} - -int -evas_common_cpu_feature_test(void (*feature)(void)) -{ -#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) - int enabled = 1; - struct sigaction act, oact, oact2; - - act.sa_handler = evas_common_cpu_catch_ill; - act.sa_flags = SA_RESTART; - sigemptyset(&act.sa_mask); - sigaction(SIGILL, &act, &oact); - - act.sa_handler = evas_common_cpu_catch_segv; - act.sa_flags = SA_RESTART; - sigemptyset(&act.sa_mask); - sigaction(SIGSEGV, &act, &oact2); - - if (sigsetjmp(detect_buf, 1)) - { - sigaction(SIGILL, &oact, NULL); - sigaction(SIGSEGV, &oact2, NULL); - return 0; - } - - feature(); - - sigaction(SIGILL, &oact, NULL); - sigaction(SIGSEGV, &oact2, NULL); - return enabled; -#else - return 0; -#endif -} - -EAPI void -evas_common_cpu_init(void) -{ - static int called = 0; - - if (called) return; - called = 1; -#ifdef BUILD_MMX - cpu_feature_mask |= CPU_FEATURE_MMX * - evas_common_cpu_feature_test(evas_common_cpu_mmx_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_MMX")) - cpu_feature_mask &= ~CPU_FEATURE_MMX; - cpu_feature_mask |= CPU_FEATURE_MMX2 * - evas_common_cpu_feature_test(evas_common_cpu_mmx2_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_MMX2")) - cpu_feature_mask &= ~CPU_FEATURE_MMX2; -#ifdef BUILD_SSE - cpu_feature_mask |= CPU_FEATURE_SSE * - evas_common_cpu_feature_test(evas_common_cpu_sse_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_SSE")) - cpu_feature_mask &= ~CPU_FEATURE_SSE; -#ifdef BUILD_SSE3 - cpu_feature_mask |= CPU_FEATURE_SSE3 * - evas_common_cpu_feature_test(evas_common_cpu_sse3_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_SSE3")) - cpu_feature_mask &= ~CPU_FEATURE_SSE3; -#endif /* BUILD_SSE3 */ -#endif /* BUILD_SSE */ -#endif /* BUILD_MMX */ -#ifdef BUILD_ALTIVEC -#ifdef __POWERPC__ -#ifdef __VEC__ - cpu_feature_mask |= CPU_FEATURE_ALTIVEC * - evas_common_cpu_feature_test(evas_common_cpu_altivec_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_ALTIVEC")) - cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; -#endif /* __VEC__ */ -#endif /* __POWERPC__ */ -#endif /* BUILD_ALTIVEC */ -#ifdef __SPARC__ - cpu_feature_mask |= CPU_FEATURE_VIS * - evas_common_cpu_feature_test(evas_common_cpu_vis_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_VIS")) - cpu_feature_mask &= ~CPU_FEATURE_VIS; -#endif /* __SPARC__ */ -#if defined(__ARM_ARCH__) -#ifdef BUILD_NEON - cpu_feature_mask |= CPU_FEATURE_NEON * - evas_common_cpu_feature_test(evas_common_cpu_neon_test); - evas_common_cpu_end_opt(); - if (getenv("EVAS_CPU_NO_NEON")) - cpu_feature_mask &= ~CPU_FEATURE_NEON; -#endif -#endif -} - -int -evas_common_cpu_has_feature(unsigned int feature) -{ - return (cpu_feature_mask & feature); -} - -int -evas_common_cpu_have_cpuid(void) -{ - return 0; -/* -#ifdef BUILD_MMX - unsigned int have_cpu_id; - - have_cpu_id = 0; - have_cpuid(have_cpu_id); - return have_cpu_id; -#else - return 0; -#endif - */ -} - -EAPI void -evas_common_cpu_can_do(int *mmx, int *sse, int *sse2) -{ - static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0; - - if (!done) - { -# ifdef HARD_CODED_P3 - cpu_feature_mask |= CPU_FEATURE_MMX; - cpu_feature_mask |= CPU_FEATURE_SSE; -#endif -#ifdef HARD_CODED_P2 - cpu_feature_mask |= CPU_FEATURE_MMX; -#endif - if (cpu_feature_mask & CPU_FEATURE_MMX) do_mmx = 1; - if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1; - if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1; - } -// INF("%i %i %i", do_mmx, do_sse, do_sse2); - *mmx = do_mmx; - *sse = do_sse; - *sse2 = do_sse2; - done = 1; -} - -#ifdef BUILD_MMX -EAPI void -evas_common_cpu_end_opt(void) -{ - if (cpu_feature_mask & - (CPU_FEATURE_MMX | CPU_FEATURE_MMX2)) - { - emms(); - } -} -#else -EAPI void -evas_common_cpu_end_opt(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_draw.h b/libraries/evas/src/lib/engines/common/evas_draw.h deleted file mode 100644 index 34e0ed3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_draw.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _EVAS_DRAW_H -#define _EVAS_DRAW_H - - -EAPI void evas_common_draw_init (void); - -EAPI RGBA_Draw_Context *evas_common_draw_context_new (void); -EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc); -EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc, - void *data, - void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), - void (*gl_free) (void *ext_dat), - void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)); -EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); -EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); -EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc); -EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a); -EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a); -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 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); -EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects); -EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects); -EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa); -EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space); -EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op); -EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h); - - -#endif /* _EVAS_DRAW_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c deleted file mode 100644 index d08e788..0000000 --- a/libraries/evas/src/lib/engines/common/evas_draw_main.c +++ /dev/null @@ -1,691 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_main.h" -#include "evas_private.h" - -EAPI Cutout_Rects* -evas_common_draw_context_cutouts_new(void) -{ - Cutout_Rects *rects; - - rects = calloc(1, sizeof(Cutout_Rects)); - return rects; -} - -EAPI void -evas_common_draw_context_cutouts_free(Cutout_Rects* rects) -{ - rects->active = 0; -} - -EAPI void -evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx) -{ - if ((idx >= 0) && (idx < rects->active)) - { - Cutout_Rect *rect; - - rect = rects->rects + idx; - memmove(rect, rect + 1, - sizeof(Cutout_Rect) * (rects->active - idx - 1)); - rects->active--; - } -} - -void -evas_common_init(void) -{ - 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(); -} - -void -evas_common_shutdown(void) -{ - evas_font_dir_cache_free(); - evas_common_image_cache_free(); -} - -EAPI void -evas_common_draw_init(void) -{ -} - -EAPI RGBA_Draw_Context * -evas_common_draw_context_new(void) -{ - RGBA_Draw_Context *dc; - - dc = calloc(1, sizeof(RGBA_Draw_Context)); - dc->sli.h = 1; - return dc; -} - -EAPI void -evas_common_draw_context_free(RGBA_Draw_Context *dc) -{ - if (!dc) return; - -#ifdef HAVE_PIXMAN - if (dc->col.pixman_color_image) - { - pixman_image_unref(dc->col.pixman_color_image); - dc->col.pixman_color_image = NULL; - } -#endif - - evas_common_draw_context_apply_clean_cutouts(&dc->cutout); - free(dc); -} - -EAPI void -evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc) -{ - evas_common_draw_context_apply_clean_cutouts(&dc->cutout); -} - -EAPI void -evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc, - void *data, - void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), - void (*gl_free) (void *ext_dat), - void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)) -{ - dc->font_ext.data = data; - dc->font_ext.func.gl_new = gl_new; - dc->font_ext.func.gl_free = gl_free; - dc->font_ext.func.gl_draw = gl_draw; -} - -EAPI void -evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ - if (dc->clip.use) - { - RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h, - x, y, w, h); - } - else - evas_common_draw_context_set_clip(dc, x, y, w, h); -} - -EAPI void -evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ - dc->clip.use = 1; - dc->clip.x = x; - dc->clip.y = y; - dc->clip.w = w; - dc->clip.h = h; -} - -EAPI void -evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc) -{ - dc->clip.use = 0; -} - -EAPI void -evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a) -{ - R_VAL(&(dc->col.col)) = (DATA8)r; - G_VAL(&(dc->col.col)) = (DATA8)g; - B_VAL(&(dc->col.col)) = (DATA8)b; - A_VAL(&(dc->col.col)) = (DATA8)a; -#ifdef HAVE_PIXMAN - if (dc && dc->col.pixman_color_image) - pixman_image_unref(dc->col.pixman_color_image); - - pixman_color_t pixman_color; - - pixman_color.alpha = (dc->col.col & 0xff000000) >> 16; - pixman_color.red = (dc->col.col & 0x00ff0000) >> 8; - pixman_color.green = (dc->col.col & 0x0000ff00); - pixman_color.blue = (dc->col.col & 0x000000ff) << 8; - - dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); -#endif - -} - -EAPI void -evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a) -{ - dc->mul.use = 1; - R_VAL(&(dc->mul.col)) = (DATA8)r; - G_VAL(&(dc->mul.col)) = (DATA8)g; - B_VAL(&(dc->mul.col)) = (DATA8)b; - A_VAL(&(dc->mul.col)) = (DATA8)a; -} - -EAPI void -evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc) -{ - dc->mul.use = 0; -} - -EAPI void -evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h) -{ - dc->mask.mask = mask; - dc->mask.x = x; - dc->mask.y = y; - dc->mask.w = w; - dc->mask.h = h; - -#ifdef HAVE_PIXMAN - if (mask->pixman.im) - pixman_image_unref(mask->pixman.im); - - if (mask->cache_entry.flags.alpha) - { - mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, - (uint32_t *)mask->mask.mask, - w * 4); - } - else - { - mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, - (uint32_t *)mask->mask.mask, - w * 4); - } -#endif - -} - -EAPI void -evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) -{ - dc->mask.mask = NULL; - -#ifdef HAVE_PIXMAN - RGBA_Image *mask; - mask = (RGBA_Image *)dc->mask.mask; - - if (mask && mask->pixman.im) - { - pixman_image_unref(mask->pixman.im); - mask->pixman.im = NULL; - } -#endif -} - - - - - -EAPI void -evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ -// if (dc->cutout.rects > 512) return; - if (dc->clip.use) - { -#if 1 // this is a bit faster - int xa1, xa2, xb1, xb2; - - xa1 = x; - xa2 = xa1 + w - 1; - xb1 = dc->clip.x; - if (xa2 < xb1) return; - xb2 = xb1 + dc->clip.w - 1; - if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; - if (xb1 > xa1) xa1 = xb1; - x = xa1; - w = xa2 - xa1 + 1; - - xa1 = y; - xa2 = xa1 + h - 1; - xb1 = dc->clip.y; - if (xa2 < xb1) return; - xb2 = xb1 + dc->clip.h - 1; - if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; - if (xb1 > xa1) xa1 = xb1; - y = xa1; - h = xa2 - xa1 + 1; -#else - RECTS_CLIP_TO_RECT(x, y, w, h, - dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); -#endif - if ((w < 1) || (h < 1)) return; - } - evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); -} - -int -evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split) -{ - /* 1 input rect, multiple out */ - Cutout_Rect in = res->rects[idx]; - - /* this is to save me a LOT of typing */ -#define INX1 (in.x) -#define INX2 (in.x + in.w) -#define SPX1 (split->x) -#define SPX2 (split->x + split->w) -#define INY1 (in.y) -#define INY2 (in.y + in.h) -#define SPY1 (split->y) -#define SPY2 (split->y + split->h) -#define X1_IN (in.x < split->x) -#define X2_IN ((in.x + in.w) > (split->x + split->w)) -#define Y1_IN (in.y < split->y) -#define Y2_IN ((in.y + in.h) > (split->y + split->h)) -#define R_NEW(_r, _x, _y, _w, _h) { evas_common_draw_context_cutouts_add(_r, _x, _y, _w, _h); } - if (!RECTS_INTERSECT(in.x, in.y, in.w, in.h, - split->x, split->y, split->w, split->h)) - { - /* No colision => no clipping, don't touch it. */ - return 1; - } - - /* S = split (ie cut out rect) */ - /* +--+ = in (rect to be cut) */ - - /* - * +---+ - * | | - * | S | - * | | - * +---+ - * - */ - if (X1_IN && X2_IN && Y1_IN && Y2_IN) - { - R_NEW(res, in.x, in.y, in.w, SPY1 - in.y); - 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[idx].h = INY2 - SPY2; - res->rects[idx].y = SPY2; - return 1; - } - /* SSSSSSS - * S+---+S - * S|SSS|S - * S|SSS|S - * S|SSS|S - * S+---+S - * SSSSSSS - */ - if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN) - { - evas_common_draw_context_cutouts_del(res, idx); - return 0; - } - /* SSS - * S+---+ - * S|S | - * S|S | - * S|S | - * S+---+ - * SSS - */ - if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN) - { - /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ - res->rects[idx].w = INX2 - SPX2; - res->rects[idx].x = SPX2; - return 1; - } - /* S - * +---+ - * | S | - * | S | - * | S | - * +---+ - * S - */ - if (X1_IN && X2_IN && !Y1_IN && !Y2_IN) - { - R_NEW(res, in.x, in.y, SPX1 - in.x, in.h); - /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ - res->rects[idx].w = INX2 - SPX2; - res->rects[idx].x = SPX2; - return 1; - } - /* SSS - * +---+S - * | S|S - * | S|S - * | S|S - * +---+S - * SSS - */ - if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN) - { - /* in => (in.x, in.y, SPX1 - in.x, in.h) */ - res->rects[idx].w = SPX1 - in.x; - return 1; - } - /* SSSSSSS - * S+---+S - * S|SSS|S - * | | - * | | - * +---+ - * - */ - if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN) - { - /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ - res->rects[idx].h = INY2 - SPY2; - res->rects[idx].y = SPY2; - return 1; - } - /* - * +---+ - * | | - * S|SSS|S - * | | - * +---+ - * - */ - if (!X1_IN && !X2_IN && Y1_IN && Y2_IN) - { - R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); - /* in => (in.x, in.y, in.w, SPY1 - in.y) */ - res->rects[idx].h = SPY1 - in.y; - return 1; - } - /* - * +---+ - * | | - * | | - * S|SSS|S - * S+---+S - * SSSSSSS - */ - if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN) - { - /* in => (in.x, in.y, in.w, SPY1 - in.y) */ - res->rects[idx].h = SPY1 - in.y; - return 1; - } - /* SSS - * S+---+ - * S|S | - * | | - * | | - * +---+ - * - */ - if (!X1_IN && X2_IN && !Y1_IN && Y2_IN) - { - R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); - /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ - res->rects[idx].h = INY2 - SPY2; - res->rects[idx].y = SPY2; - return 1; - } - /* S - * +---+ - * | S | - * | | - * | | - * +---+ - * - */ - if (X1_IN && X2_IN && !Y1_IN && Y2_IN) - { - 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[idx].h = INY2 - SPY2; - res->rects[idx].y = SPY2; - return 1; - } - /* SSS - * +---+S - * | S|S - * | | - * | | - * +---+ - * - */ - if (X1_IN && !X2_IN && !Y1_IN && Y2_IN) - { - R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); - /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ - res->rects[idx].h = INY2 - SPY2; - res->rects[idx].y = SPY2; - return 1; - } - /* - * +---+ - * | | - * S|S | - * | | - * +---+ - * - */ - if (!X1_IN && X2_IN && Y1_IN && Y2_IN) - { - 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[idx].h = SPY1 - in.y; - return 1; - } - /* - * +---+ - * | | - * | S|S - * | | - * +---+ - * - */ - if (X1_IN && !X2_IN && Y1_IN && Y2_IN) - { - 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[idx].h = SPY1 - in.y; - return 1; - } - /* - * +---+ - * | | - * | | - * S|S | - * S+---+ - * SSS - */ - if (!X1_IN && X2_IN && Y1_IN && !Y2_IN) - { - R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); - /* in => (in.x, in.y, in.w, SPY1 - in.y) */ - res->rects[idx].h = SPY1 - in.y; - return 1; - } - /* - * +---+ - * | | - * | | - * | S | - * +---+ - * S - */ - if (X1_IN && X2_IN && Y1_IN && !Y2_IN) - { - 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[idx].h = SPY1 - in.y; - return 1; - } - /* - * +---+ - * | | - * | | - * | S|S - * +---+S - * SSS - */ - if (X1_IN && !X2_IN && Y1_IN && !Y2_IN) - { - R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); - /* in => (in.x, in.y, in.w, SPY1 - in.y) */ - res->rects[idx].h = SPY1 - in.y; - return 1; - } - evas_common_draw_context_cutouts_del(res, idx); - return 0; -#undef INX1 -#undef INX2 -#undef SPX1 -#undef SPX2 -#undef INY1 -#undef INY2 -#undef SPY1 -#undef SPY2 -#undef X1_IN -#undef X2_IN -#undef Y1_IN -#undef Y2_IN -#undef R_NEW -} - -EAPI Cutout_Rects* -evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc) -{ - Cutout_Rects* res, *res2; - int i; - int j; - - if (!dc->clip.use) return NULL; - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; - - - res = evas_common_draw_context_cutouts_new(); - evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - - for (i = 0; i < dc->cutout.active; ++i) - { - /* Don't loop on the element just added to the list as they are already correctly clipped. */ - int active = res->active; - - for (j = 0; j < active; ) - { - if (evas_common_draw_context_cutout_split(res, j, dc->cutout.rects + i)) - ++j; - else - active--; - } - } - /* merge rects */ -#define RI res->rects[i] -#define RJ res->rects[j] - if (res->active > 1) - { - int found = 1; - - while (found) - { - found = 0; - for (i = 0; i < res->active; i++) - { - for (j = i + 1; j < res->active; j++) - { - /* skip empty rects we are removing */ - if (RJ.w == 0) continue; - /* check if its same width, immediately above or below */ - if ((RJ.w == RI.w) && (RJ.x == RI.x)) - { - if ((RJ.y + RJ.h) == RI.y) /* above */ - { - RI.y = RJ.y; - RI.h += RJ.h; - RJ.w = 0; - found = 1; - } - else if ((RI.y + RI.h) == RJ.y) /* below */ - { - RI.h += RJ.h; - RJ.w = 0; - found = 1; - } - } - /* check if its same height, immediately left or right */ - else if ((RJ.h == RI.h) && (RJ.y == RI.y)) - { - if ((RJ.x + RJ.w) == RI.x) /* left */ - { - RI.x = RJ.x; - RI.w += RJ.w; - RJ.w = 0; - found = 1; - } - else if ((RI.x + RI.w) == RJ.x) /* right */ - { - RI.w += RJ.w; - RJ.w = 0; - found = 1; - } - } - } - } - } - res2 = evas_common_draw_context_cutouts_new(); - for (i = 0; i < res->active; i++) - { - if (RI.w == 0) continue; - evas_common_draw_context_cutouts_add(res2, RI.x, RI.y, RI.w, RI.h); - } - free(res->rects); - free(res); - return res2; - } - return res; -} - -EAPI void -evas_common_draw_context_apply_clear_cutouts(Cutout_Rects* rects) -{ - evas_common_draw_context_apply_clean_cutouts(rects); - free(rects); -} - -EAPI void -evas_common_draw_context_apply_clean_cutouts(Cutout_Rects* rects) -{ - free(rects->rects); - rects->rects = NULL; - rects->active = 0; - rects->max = 0; -} - -EAPI void -evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa) -{ - dc->anti_alias = !!aa; -} - -EAPI void -evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space) -{ - dc->interpolation.color_space = color_space; -} - -EAPI void -evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op) -{ - dc->render_op = op; -} - -EAPI void -evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h) -{ - dc->sli.y = y; - dc->sli.h = h; -} diff --git a/libraries/evas/src/lib/engines/common/evas_font.h b/libraries/evas/src/lib/engines/common/evas_font.h deleted file mode 100644 index 533d897..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _EVAS_FONT_H -#define _EVAS_FONT_H -#include "evas_text_utils.h" - - -/* main */ - -EAPI void evas_common_font_init (void); -EAPI void evas_common_font_shutdown (void); -EAPI void evas_common_font_font_all_unload (void); - -EAPI int evas_common_font_ascent_get (RGBA_Font *fn); -EAPI int evas_common_font_descent_get (RGBA_Font *fn); -EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn); -EAPI int evas_common_font_max_descent_get (RGBA_Font *fn); -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 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 */ -EAPI void evas_common_font_dpi_set (int dpi); -EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size); -EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name); -EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs); -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_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, 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, 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, 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 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 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); -#endif - -void evas_common_font_load_init(void); -void evas_common_font_load_shutdown(void); - -#endif /* _EVAS_FONT_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_font_default_walk.x b/libraries/evas/src/lib/engines/common/evas_font_default_walk.x deleted file mode 100644 index 94e7fde..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_default_walk.x +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef _EVAS_FONT_DEFAULT_WALK_X -#define _EVAS_FONT_DEFAULT_WALK_X -/* Macros for text walking */ - -/** - * @def EVAS_FONT_WALK_TEXT_INIT - * @internal - * This macro defines the variables that will later be used with the following - * macros, and by font handling functions. - * @see EVAS_FONT_WALK_TEXT_START - * @see EVAS_FONT_WALK_TEXT_WORK - * @see EVAS_FONT_WALK_TEXT_END - */ -# 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_START() \ - Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \ - text_props->info->ot + text_props->start : NULL; \ - if (!_ot_itr) break; \ - for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \ - { -#else -#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_START - * @internal - * This runs through the text in visual 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 - */ -#define EVAS_FONT_WALK_TEXT_START() \ - do \ - { \ - Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \ - text_props->info->glyph + text_props->start : NULL; \ - if (!_glyph_itr) break; \ - _EVAS_FONT_WALK_TEXT_START() - -/*FIXME: doc */ -#ifdef OT_SUPPORT -# define EVAS_FONT_WALK_X_OFF \ - (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr))) -# define EVAS_FONT_WALK_Y_OFF \ - (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr))) -# define EVAS_FONT_WALK_POS \ - (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset) -# define EVAS_FONT_WALK_POS_NEXT \ - ((!EVAS_FONT_WALK_IS_LAST) ? \ - EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \ - text_props->text_offset : \ - EVAS_FONT_WALK_POS \ - ) -# define EVAS_FONT_WALK_POS_PREV \ - ((char_index > 0) ? \ - EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \ - text_props->text_offset : \ - EVAS_FONT_WALK_POS \ - ) -#else -# define EVAS_FONT_WALK_X_OFF 0 -# define EVAS_FONT_WALK_Y_OFF 0 -# define EVAS_FONT_WALK_POS \ - ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ - (text_props->len - char_index - 1) : \ - (char_index)) -# define EVAS_FONT_WALK_POS_NEXT \ - ((!EVAS_FONT_WALK_IS_LAST) ? \ - ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ - text_props->len - char_index - 2 \ - : (char_index + 1)) : \ - EVAS_FONT_WALK_POS) -# define EVAS_FONT_WALK_POS_PREV \ - ((char_index > 0) ? \ - ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ - text_props->len - char_index \ - : (char_index - 1)) : \ - EVAS_FONT_WALK_POS) -#endif - - -#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 > 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_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 \ - (char_index + 1 == text_props->len) -#define EVAS_FONT_WALK_IS_FIRST \ - (char_index == 0) -#define EVAS_FONT_WALK_LEN (text_props->len) - -/** - * @def EVAS_FONT_WALK_TEXT_WORK - * @internal - * 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_START - * @see EVAS_FONT_WALK_TEXT_INIT - * @see EVAS_FONT_WALK_TEXT_END - */ -#define EVAS_FONT_WALK_TEXT_WORK() do {} while(0) - -/** - * @def EVAS_FONT_WALK_TEXT_END - * @internal - * 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 = _glyph_itr->pen_after - _start_pen; \ - } \ - } \ - } \ - while(0) - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c deleted file mode 100644 index 638cdfe..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_draw.c +++ /dev/null @@ -1,658 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" -#include "evas_blend_private.h" - -#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ -#include "evas_font_private.h" /* for Frame-Queuing support */ - -#include "evas_font_ot.h" - -/* Forcibly disable the broken word/metric caching. */ -#ifdef METRIC_CACHE -# undef METRIC_CACHE -#endif - -#ifdef WORD_CACHE -# undef WORD_CACHE -#endif - -#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; - struct cinfo *cinfo; - Evas_Text_Props text_props; - DATA8 *im; - int roww; - int width; - int height; - int baseline; -}; - -struct cinfo -{ - FT_UInt index; - struct - { - int x, y; - } pos; - int posx; - RGBA_Font_Glyph *fg; - struct - { - int w,h; - int rows; - unsigned char *data; - } bm; -}; - - -#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 Evas_Text_Props *text_props); -#endif - -EAPI void -evas_common_font_draw_init(void) -{ - char *p; - int tmp; - - if ((p = getenv("EVAS_WORD_CACHE_MAX_WORDS"))) - { - tmp = strtol(p,NULL,10); - /* 0 to disable of course */ - if (tmp > -1 && tmp < 500){ - max_cached_words = tmp; - } - } -} - -#ifdef EVAS_FRAME_QUEUING -EAPI void -evas_common_font_draw_finish(void) -{ -} -#endif - -/* - * BiDi handling: We receive the shaped string + other props from text_props, - * we need to reorder it so we'll have the visual string (the way we draw) - * and then for kerning we have to switch the order of the kerning query (as the prev - * 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 __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, int im_w, int im_h __UNUSED__) -{ - DATA32 *im; - RGBA_Font_Int *fi; - EVAS_FONT_WALK_TEXT_INIT(); - - fi = text_props->font_instance; - if (!fi) return; - - 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; - - len = text_props->len; - - if (len > 2 && (len < WORD_CACHE_MAXLEN)) - { - struct prword *word; - - word = - evas_font_word_prerender(dc, text_props); - if (word) - { - int j, rowstart, rowend, xstart, xrun; - - im = dst->image.data; - xrun = word->width; - y -= word->baseline; - xstart = 0; - rowstart = 0; - rowend = word->height; - /* Clip to extent */ - if (x + xrun > ext_x + ext_w) - { - xrun -= x + xrun - ext_x - ext_w; - } - if (x < ext_x) - { - int excess = ext_x - x; - xstart = excess - 1; - xrun -= excess; - x = ext_x; - } - if (y + rowend > ext_y + ext_h) - { - rowend -= (y - ext_y + rowend - ext_h); - } - if (y < ext_y) - { - int excess = ext_y - y; - rowstart += excess; - //rowend -= excess; - // y = ext_y; - } - - if (xrun < 1) return; -/* For some reason, metric and word chache are exactly the same except for - * this piece of code that makes metric go nuts. ATM, we'll just go the - * WORD_CACHE path. */ -#if defined(METRIC_CACHE) || defined(WORD_CACHE) - if (word->im) - { - for (j = rowstart ; j < rowend ; j ++) - { - func(NULL, word->im + (word->roww * j) + xstart, dc->col.col, - im + ((y + j) * im_w) + x, xrun); - } - return; - } -# elif defined(METRIC_CACHE) - unsigned int ind; - - y += word->baseline; - for (ind = 0 ; ind < len ; ind ++) - { - // FIXME Do we need to draw? - struct cinfo *ci = word->cinfo + ind; - for (j = rowstart ; j < rowend ; j ++) - { - if ((ci->fg->ext_dat) && (dc->font_ext.func.gl_draw)) - { - /* ext glyph draw */ - dc->font_ext.func.gl_draw(dc->font_ext.data, - (void *)dst, - dc, ci->fg, - x + ci->pos.x, - y - ci->bm.h + j); - } - else - { - func(NULL, word->im + (word->roww * j) + xstart, - dc->col.col, im + ((y + j) * im_w) + x, xrun); - } - } - } - return; -# endif - } - } -#endif - - im = dst->image.data; - - EVAS_FONT_WALK_TEXT_START() - { - FT_UInt idx; - RGBA_Font_Glyph *fg; - int chr_x, chr_y; - - if (!EVAS_FONT_WALK_IS_VISIBLE) continue; - - idx = EVAS_FONT_WALK_INDEX; - - LKL(fi->ft_mutex); - fg = evas_common_font_int_cache_glyph_get(fi, idx); - if (!fg) - { - LKU(fi->ft_mutex); - continue; - } - - LKU(fi->ft_mutex); - - if (dc->font_ext.func.gl_new) - { - /* extension calls */ - fg->ext_dat = dc->font_ext.func.gl_new(dc->font_ext.data, fg); - fg->ext_dat_free = dc->font_ext.func.gl_free; - } - - chr_x = x + EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; - chr_y = y + EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; - - if (chr_x < (ext_x + ext_w)) - { - DATA8 *data; - int i, j, w, h; - - data = fg->glyph_out->bitmap.buffer; - j = fg->glyph_out->bitmap.pitch; - w = fg->glyph_out->bitmap.width; - if (j < w) j = w; - h = fg->glyph_out->bitmap.rows; - /* - if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) - && (fg->glyph_out->bitmap.num_grays == 256) - ) - */ - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_FONT - int index; - DATA32 *font_alpha_buffer; - pixman_image_t *font_mask_image; - - font_alpha_buffer = alloca(w * h * sizeof(DATA32)); - for (index = 0; index < (w * h); index++) - font_alpha_buffer[index] = data[index] << 24; - - font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, - font_alpha_buffer, - w * sizeof(DATA32)); - - if (!font_mask_image) return; -# endif -#endif - - { - if ((j > 0) && (chr_x + w > ext_x)) - { - if ((fg->ext_dat) && (dc->font_ext.func.gl_draw)) - { - /* ext glyph draw */ - dc->font_ext.func.gl_draw(dc->font_ext.data, - (void *)dst, - dc, fg, chr_x, - y - (chr_y - y)); - } - else - { - if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_FONT - if ((dst->pixman.im) && - (dc->col.pixman_color_image)) - pixman_image_composite(PIXMAN_OP_OVER, - dc->col.pixman_color_image, - font_mask_image, - dst->pixman.im, - chr_x, - y - (chr_y - y), - 0, 0, - chr_x, - y - (chr_y - y), - w, h); - else -# endif -#endif - { - for (i = 0; i < h; i++) - { - int dx, dy; - int in_x, in_w; - - in_x = 0; - in_w = 0; - dx = chr_x; - dy = y - (chr_y - i - y); -#ifdef EVAS_SLI - if (((dy) % dc->sli.h) == dc->sli.y) -#endif - { - if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) - { - if (dx + w > (ext_x + ext_w)) - in_w += (dx + w) - (ext_x + ext_w); - if (dx < ext_x) - { - in_w += ext_x - dx; - in_x = ext_x - dx; - dx = ext_x; - } - if (in_w < w) - { - func(NULL, data + (i * j) + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); - } - } - } - } - } - } - else - { - DATA8 *tmpbuf = NULL, *dp, *tp, bits; - int bi, bj; - const DATA8 bitrepl[2] = {0x0, 0xff}; - - tmpbuf = alloca(w); - for (i = 0; i < h; i++) - { - int dx, dy; - int in_x, in_w, end; - - in_x = 0; - in_w = 0; - dx = chr_x; - dy = y - (chr_y - i - y); -#ifdef EVAS_SLI - if (((dy) % dc->sli.h) == dc->sli.y) -#endif - { - tp = tmpbuf; - dp = data + (i * 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++; - } - if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) - { - if (dx + w > (ext_x + ext_w)) - in_w += (dx + w) - (ext_x + ext_w); - if (dx < ext_x) - { - in_w += ext_x - dx; - in_x = ext_x - dx; - dx = ext_x; - } - if (in_w < w) - { - func(NULL, tmpbuf + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); - } - } - } - } - } - } - } - } -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_FONT - pixman_image_unref(font_mask_image); -# endif -#endif - } - else - break; - } - EVAS_FONT_WALK_TEXT_END(); - evas_common_font_int_use_trim(); -} - -EAPI void -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; - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch; - int i; - - im_w = dst->cache_entry.w; - im_h = dst->cache_entry.h; - - ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h; - if (dc->clip.use) - { - ext_x = dc->clip.x; - ext_y = dc->clip.y; - ext_w = dc->clip.w; - ext_h = dc->clip.h; - if (ext_x < 0) - { - ext_w += ext_x; - ext_x = 0; - } - if (ext_y < 0) - { - ext_h += ext_y; - ext_y = 0; - } - if ((ext_x + ext_w) > im_w) - ext_w = im_w - ext_x; - if ((ext_y + ext_h) > im_h) - ext_h = im_h - ext_y; - } - if (ext_w <= 0) return; - if (ext_h <= 0) return; - -#ifdef EVAS_FRAME_QUEUING - LKL(fn->lock); -#endif -// 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_props, - func, ext_x, ext_y, ext_w, ext_h, - im_w, im_h); - } - else - { - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w > 0) && (dc->clip.h > 0)) - { - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - 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_props, - func, r->x, r->y, r->w, r->h, - im_w, im_h); - } - evas_common_draw_context_apply_clear_cutouts(rects); - } - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; - } -#ifdef EVAS_FRAME_QUEUING - LKU(fn->lock); -#endif -} - -/* Only used if cache is on */ -#if defined(METRIC_CACHE) || defined(WORD_CACHE) - -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; - unsigned char *im; - int width; - int height, above, below, baseline, descent; - unsigned int i,j; - struct prword *w; - int last_delta = 0; - 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 - gl = dc->font_ext.func.gl_new ? 1: 0; - if (gl) return NULL; -# endif - - LKL(lock_words); - EINA_INLIST_FOREACH(words,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; - - /* First pass: Work out how big and populate */ - metrics = malloc(sizeof(struct cinfo) * len); - ci = metrics; - EVAS_FONT_WALK_TEXT_START() - { - FT_UInt index; - RGBA_Font_Glyph *fg; - index = EVAS_FONT_WALK_INDEX; - LKL(fi->ft_mutex); - fg = evas_common_font_int_cache_glyph_get(fi, index); - if (!fg) - { - LKU(fi->ft_mutex); - continue; - } - - LKU(fi->ft_mutex); - EVAS_FONT_WALK_TEXT_WORK(); - /* Currently broken with invisible chars if (!EVAS_FONT_WALK_IS_VISIBLE) continue; */ - ci->index = index; - ci->fg = fg; - - if (gl) - { - ci->fg->ext_dat =dc->font_ext.func.gl_new(dc->font_ext.data,ci->fg); - ci->fg->ext_dat_free = dc->font_ext.func.gl_free; - } - ci->bm.data = ci->fg->glyph_out->bitmap.buffer; - ci->bm.w = MAX(ci->fg->glyph_out->bitmap.pitch, - ci->fg->glyph_out->bitmap.width); - ci->bm.rows = ci->fg->glyph_out->bitmap.rows; - ci->bm.h = ci->fg->glyph_out->top; - above = ci->bm.rows - (ci->bm.rows - ci->bm.h); - below = ci->bm.rows - ci->bm.h; - if (below > descent) descent = below; - if (above > baseline) baseline = above; - ci->pos.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; - ci->pos.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; - last_delta = EVAS_FONT_WALK_X_ADV - - (ci->bm.w + ci->fg->glyph_out->left); - ci++; - } - EVAS_FONT_WALK_TEXT_END(); - - /* First loop done */ - width = EVAS_FONT_WALK_PEN_X; - if (last_delta < 0) - width -= last_delta; - width = (width & 0x7) ? width + (8 - (width & 0x7)) : width; - - height = baseline + descent; - if (!gl) - { - im = calloc(height, width); - for (i = 0 ; i < len ; i ++) - { - struct cinfo *cin = metrics + i; - - for (j = 0 ; j < cin->bm.rows ; j ++) - { - int correction; /* Used to remove negative inset and such */ - if (cin->pos.x < 0) - correction = -cin->pos.x; - else - correction = 0; - - memcpy(im + cin->pos.x + (j + baseline - cin->bm.h) * width + - correction, - cin->bm.data + j * cin->bm.w + correction, - cin->bm.w - correction); - } - } - } - else - { - im = NULL; - } - - /* Save it */ - struct prword *save; - - save = malloc(sizeof(struct prword)); - save->cinfo = metrics; - 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) - save->width += last_delta; - save->roww = width; - save->height = height; - save->baseline = baseline; - LKL(lock_words); - words = eina_inlist_prepend(words, EINA_INLIST_GET(save)); - - /* Clean up if too long */ - if (eina_inlist_count(words) > max_cached_words) - { - struct prword *last = (struct prword *)(words->last); - - if (last) - { - if (last->im) free(last->im); - if (last->cinfo) free(last->cinfo); - evas_common_text_props_content_unref(&last->text_props); - words = eina_inlist_remove(words, EINA_INLIST_GET(last)); - free(last); - } - } - LKU(lock_words); - - return save; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_font_load.c b/libraries/evas/src/lib/engines/common/evas_font_load.c deleted file mode 100644 index abba9e3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_load.c +++ /dev/null @@ -1,925 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -#include - -#include "evas_font_private.h" /* for Frame-Queuing support */ -#include "evas_font_ot.h" - -#ifdef USE_HARFBUZZ -# include -# include -#endif - -extern FT_Library evas_ft_lib; - -static int font_cache_usage = 0; -static int font_cache = 0; -static int font_dpi = 75; - -static Eina_Hash *fonts_src = NULL; -static Eina_Hash *fonts = NULL; -static Eina_List *fonts_lru = NULL; -static Eina_Inlist *fonts_use_lru = NULL; -static int fonts_use_usage = 0; - -static void _evas_common_font_int_clear(RGBA_Font_Int *fi); - -static int -_evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__, - const RGBA_Font_Int *k2, int k2_length __UNUSED__) -{ - /* RGBA_Font_Source->name is a stringshare */ - if (k1->src->name == k2->src->name) - { - 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); -} - -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; -} - -static void -_evas_common_font_source_free(RGBA_Font_Source *fs) -{ - FTLOCK(); - FT_Done_Face(fs->ft.face); - FTUNLOCK(); - if (fs->name) eina_stringshare_del(fs->name); - if (fs->file) eina_stringshare_del(fs->file); - free(fs); -} - -static void -_evas_common_font_int_free(RGBA_Font_Int *fi) -{ - FT_Done_Size(fi->ft.size); - - evas_common_font_int_modify_cache_by(fi, -1); - _evas_common_font_int_clear(fi); - eina_hash_free(fi->kerning); - - LKD(fi->ft_mutex); -#ifdef USE_HARFBUZZ - hb_font_destroy(fi->ft.hb_font); -#endif - evas_common_font_source_free(fi->src); - if (fi->references == 0) fonts_lru = eina_list_remove(fonts_lru, fi); - if (fi->fash) fi->fash->freeme(fi->fash); - if (fi->inuse) - { - fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); - fi->inuse = 0; - fonts_use_usage -= fi->usage; - fi->usage = 0; - } - free(fi); -} - -void -evas_common_font_load_init(void) -{ - fonts_src = eina_hash_string_small_new(EINA_FREE_CB(_evas_common_font_source_free)); - fonts = eina_hash_new(NULL, - EINA_KEY_CMP(_evas_font_cache_int_cmp), - EINA_KEY_HASH(_evas_font_cache_int_hash), - EINA_FREE_CB(_evas_common_font_int_free), - 5); -} - -void -evas_common_font_load_shutdown(void) -{ - eina_hash_free(fonts); - fonts = NULL; - eina_hash_free(fonts_src); - fonts_src = NULL; -} - -EAPI void -evas_common_font_dpi_set(int dpi) -{ - font_dpi = dpi; -} - -EAPI RGBA_Font_Source * -evas_common_font_source_memory_load(const char *name, const void *data, int data_size) -{ - int error; - RGBA_Font_Source *fs; - - assert(name != NULL); - fs = calloc(1, sizeof(RGBA_Font_Source) + data_size); - if (!fs) return NULL; - fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source); - fs->data_size = data_size; - fs->current_size = 0; - memcpy(fs->data, data, data_size); - FTLOCK(); - error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); - FTUNLOCK(); - if (error) - { - free(fs); - return NULL; - } - fs->name = eina_stringshare_add(name); - fs->file = NULL; - FTLOCK(); - error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); - if (error) - { - FT_Done_Face(fs->ft.face); - fs->ft.face = NULL; - free(fs); - return NULL; - } - FTUNLOCK(); - fs->ft.orig_upem = fs->ft.face->units_per_EM; - fs->references = 1; - eina_hash_direct_add(fonts_src, fs->name, fs); - return fs; -} - -EAPI RGBA_Font_Source * -evas_common_font_source_load(const char *name) -{ - RGBA_Font_Source *fs; - - assert(name != NULL); - fs = calloc(1, sizeof(RGBA_Font_Source)); - if (!fs) return NULL; - fs->data = NULL; - fs->data_size = 0; - fs->current_size = 0; - fs->ft.face = NULL; - fs->name = eina_stringshare_add(name); - fs->file = eina_stringshare_ref(fs->name); - fs->ft.orig_upem = 0; - fs->references = 1; - eina_hash_direct_add(fonts_src, fs->name, fs); - return fs; -} - -void -evas_common_font_source_unload(RGBA_Font_Source *fs) -{ - FTLOCK(); - FT_Done_Face(fs->ft.face); - fs->ft.face = NULL; - FTUNLOCK(); -} - -void -evas_common_font_source_reload(RGBA_Font_Source *fs) -{ - if (fs->ft.face) return; - if (fs->data) - { - int error; - - FTLOCK(); - error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); - FTUNLOCK(); - if (error) return; - FTLOCK(); - error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); - if (error) - { - FT_Done_Face(fs->ft.face); - fs->ft.face = NULL; - } - FTUNLOCK(); - } - else - evas_common_font_source_load_complete(fs); -} - -EAPI int -evas_common_font_source_load_complete(RGBA_Font_Source *fs) -{ - int error; - - FTLOCK(); - error = FT_New_Face(evas_ft_lib, fs->file, 0, &(fs->ft.face)); - if (error) - { - FTUNLOCK(); - fs->ft.face = NULL; - return error; - } - error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); - if (error) - { - FT_Done_Face(fs->ft.face); - FTUNLOCK(); - fs->ft.face = NULL; - return error; - } - FTUNLOCK(); - fs->ft.orig_upem = fs->ft.face->units_per_EM; - return error; -} - -EAPI RGBA_Font_Source * -evas_common_font_source_find(const char *name) -{ - RGBA_Font_Source *fs; - - if (!name) return NULL; - fs = eina_hash_find(fonts_src, name); - if (fs) - { - fs->references++; - return fs; - } - return NULL; -} - -EAPI void -evas_common_font_source_free(RGBA_Font_Source *fs) -{ - fs->references--; - if (fs->references > 0) return; - eina_hash_del(fonts_src, fs->name, fs); -} - -EAPI void -evas_common_font_size_use(RGBA_Font *fn) -{ - RGBA_Font_Int *fi; - Eina_List *l; - - EINA_LIST_FOREACH(fn->fonts, l, fi) - { - if (fi->src->current_size != fi->size) - { - evas_common_font_source_reload(fi->src); - FTLOCK(); - FT_Activate_Size(fi->ft.size); - FTUNLOCK(); - fi->src->current_size = fi->size; - } - } -} - -static int -_evas_common_font_double_int_cmp(const int *key1, __UNUSED__ int key1_length, - const int *key2, __UNUSED__ int key2_length) -{ - if (key1[0] - key2[0] == 0) return key1[1] - key2[1]; - return key1[0] - key2[0]; -} - -static int -_evas_common_font_double_int_hash(const unsigned int key[2], int key_length) -{ - return - eina_hash_int32(&key[0], key_length) ^ - eina_hash_int32(&key[1], key_length); -} - -static void -_evas_common_font_int_cache_init(RGBA_Font_Int *fi) -{ - /* Add some font kerning cache. */ - fi->kerning = eina_hash_new(NULL, - EINA_KEY_CMP(_evas_common_font_double_int_cmp), - EINA_KEY_HASH(_evas_common_font_double_int_hash), - free, 3); - LKI(fi->ft_mutex); -} - -EAPI RGBA_Font_Int * -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, 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) - fi->src = evas_common_font_source_memory_load(name, data, data_size); - if (!fi->src) - { - free(fi); - return NULL; - } - fi->size = size; - _evas_common_font_int_cache_init(fi); - fi = evas_common_font_int_load_init(fi); - evas_common_font_int_load_complete(fi); - return fi; -} - -EAPI RGBA_Font_Int * -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, 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); - return fi; -} - -EAPI RGBA_Font_Int * -evas_common_font_int_load_init(RGBA_Font_Int *fi) -{ - fi->ft.size = NULL; - fi->references = 1; - eina_hash_direct_add(fonts, fi, fi); - return fi; -} - -EAPI RGBA_Font_Int * -evas_common_font_int_load_complete(RGBA_Font_Int *fi) -{ - int val, dv; - int ret; - int error; - - FTLOCK(); - error = FT_New_Size(fi->src->ft.face, &(fi->ft.size)); - if (!error) - { - FT_Activate_Size(fi->ft.size); - } - fi->real_size = fi->size * 64; - error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi); - if (error) - { - fi->real_size = fi->size; - error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size); - } - FTUNLOCK(); - if (error) - { - int i; - int chosen_size = 0; - int chosen_width = 0; - - for (i = 0; i < fi->src->ft.face->num_fixed_sizes; i++) - { - int s; - int d, cd; - - s = fi->src->ft.face->available_sizes[i].height; - cd = chosen_size - fi->size; - if (cd < 0) cd = -cd; - d = s - fi->size; - if (d < 0) d = -d; - if (d < cd) - { - chosen_width = fi->src->ft.face->available_sizes[i].width; - chosen_size = s; - } - if (d == 0) break; - } - fi->real_size = chosen_size; - FTLOCK(); - error = FT_Set_Pixel_Sizes(fi->src->ft.face, chosen_width, fi->real_size); - FTUNLOCK(); - if (error) - { - /* couldn't choose the size anyway... what now? */ - } - } - fi->src->current_size = 0; - fi->max_h = 0; - val = (int)fi->src->ft.face->bbox.yMax; - if (fi->src->ft.face->units_per_EM != 0) - { - dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; - ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); - } - else ret = val; - fi->max_h += ret; - val = -(int)fi->src->ft.face->bbox.yMin; - if (fi->src->ft.face->units_per_EM != 0) - { - dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; - ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); - } - 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_SLANT - * or FONT_REND_WEIGHT for software rendering. */ - fi->runtime_rend = FONT_REND_REGULAR; - if ((fi->wanted_rend & FONT_REND_SLANT) && - !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC)) - fi->runtime_rend |= FONT_REND_SLANT; - - if ((fi->wanted_rend & FONT_REND_WEIGHT) && - !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD)) - fi->runtime_rend |= FONT_REND_WEIGHT; - - return fi; -} - -EAPI RGBA_Font * -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, - wanted_rend); - if (!fi) return NULL; - fn = calloc(1, sizeof(RGBA_Font)); - if (!fn) - { - fi->references--; - if (fi->references == 0) - { - fonts_lru = eina_list_prepend(fonts_lru, fi); - evas_common_font_int_modify_cache_by(fi, 1); - evas_common_font_flush(); - } - return NULL; - } - fn->fonts = eina_list_append(fn->fonts, fi); - fn->hinting = FONT_BYTECODE_HINT; - fi->hinting = fn->hinting; - fn->references = 1; - LKI(fn->lock); -#ifdef EVAS_FRAME_QUEUING - LKI(fn->ref_fq_add); - LKI(fn->ref_fq_del); - eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del)); -#endif - if (fi->inuse) evas_common_font_int_promote(fi); - else - { - fi->inuse = 1; - fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); - } - return fn; -} - - -//ZZZ: font struct looks like: -// fn->(fi, fi, fi, ...) -// fi->fs - -EAPI RGBA_Font * -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, wanted_rend); - if (!fi) return NULL; - /* First font, complete load */ - if (!fi->ft.size) - { - if (!fi->src->ft.face) - { - if (evas_common_font_source_load_complete(fi->src)) - { - fi->references--; - if (fi->references == 0) - { - fonts_lru = eina_list_prepend(fonts_lru, fi); - evas_common_font_int_modify_cache_by(fi, 1); - evas_common_font_flush(); - } - return NULL; - } - } - evas_common_font_int_load_complete(fi); - } - fn = calloc(1, sizeof(RGBA_Font)); - if (!fn) - { - fi->references--; - if (fi->references == 0) - { - fonts_lru = eina_list_prepend(fonts_lru, fi); - evas_common_font_int_modify_cache_by(fi, 1); - evas_common_font_flush(); - } - return NULL; - } - - fn->fonts = eina_list_append(fn->fonts, fi); - fn->hinting = FONT_BYTECODE_HINT; - fi->hinting = fn->hinting; - fn->references = 1; - LKI(fn->lock); -#ifdef EVAS_FRAME_QUEUING - LKI(fn->ref_fq_add); - LKI(fn->ref_fq_del); - eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del)); -#endif - if (fi->inuse) evas_common_font_int_promote(fi); - else - { - fi->inuse = 1; - fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); - } - return fn; -} - -EAPI RGBA_Font * -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, wanted_rend); - if (fi) - { - fn->fonts = eina_list_append(fn->fonts, fi); - fi->hinting = fn->hinting; - if (fi->inuse) evas_common_font_int_promote(fi); - else - { - fi->inuse = 1; - fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); - } - return fn; - } - return NULL; -} - -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) -{ - RGBA_Font_Int *fi; - - if (!fn) - return NULL; - fi = evas_common_font_int_memory_load(name, size, data, data_size, wanted_rend); - if (fi) - { - fn->fonts = eina_list_append(fn->fonts, fi); - fi->hinting = fn->hinting; - if (fi->inuse) evas_common_font_int_promote(fi); - else - { - fi->inuse = 1; - fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); - } - return fn; - } - return NULL; -} - -EAPI void -evas_common_font_free(RGBA_Font *fn) -{ - Eina_List *l; - RGBA_Font_Int *fi; - - if (!fn) return; - fn->references--; - if (fn->references > 0) return; -#ifdef EVAS_FRAME_QUEUING - LKL(fn->ref_fq_add); - LKL(fn->ref_fq_del); - if (fn->ref_fq[0] != fn->ref_fq[1]) - { - LKU(fn->ref_fq_add); - LKU(fn->ref_fq_del); - return; - } - LKU(fn->ref_fq_add); - LKU(fn->ref_fq_del); -#endif - EINA_LIST_FOREACH(fn->fonts, l, fi) - { - fi->references--; - if (fi->references == 0) - { - fonts_lru = eina_list_append(fonts_lru, fi); - evas_common_font_int_modify_cache_by(fi, 1); - } - } - evas_common_font_flush(); - eina_list_free(fn->fonts); - if (fn->fash) fn->fash->freeme(fn->fash); - LKD(fn->lock); -#ifdef EVAS_FRAME_QUEUING - LKD(fn->ref_fq_add); - LKD(fn->ref_fq_del); - eina_condition_free(&(fn->cond_fq_del)); -#endif - free(fn); -} - -EAPI void -evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting) -{ - Eina_List *l; - RGBA_Font_Int *fi; - - if (!fn) return; - fn->hinting = hinting; - EINA_LIST_FOREACH(fn->fonts, l, fi) - { - fi->hinting = fn->hinting; - } -} - -EAPI Eina_Bool -evas_common_hinting_available(Font_Hint_Flags hinting) -{ - switch (hinting) - { - case FONT_NO_HINT: - case FONT_AUTO_HINT: - /* these two hinting modes are always available */ - return EINA_TRUE; - case FONT_BYTECODE_HINT: - /* Only use the bytecode interpreter if support for the _patented_ - * algorithms is available because the free bytecode - * interpreter's results are too crappy. - * - * On freetyp 2.2+, we can ask the library about support for - * the patented interpreter. On older versions, we need to use - * macros to check for it. - */ -#if FREETYPE_MINOR >= 2 - return FT_Get_TrueType_Engine_Type(evas_ft_lib) >= - FT_TRUETYPE_ENGINE_TYPE_PATENTED; -#else - /* we may not rely on TT_CONFIG_OPTION_BYTECODE_INTERPRETER - * here to find out whether it's supported. - * - * so, assume it is. o_O - */ - return EINA_TRUE; -#endif - } - /* shouldn't get here - need to add another case statement */ - return EINA_FALSE; -} - -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) -{ - RGBA_Font *fn; - - 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, Font_Rend_Flags wanted_rend) -{ - RGBA_Font *fn; - - 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, Font_Rend_Flags wanted_rend) -{ - 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, Font_Rend_Flags wanted_rend) -{ - 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; -} - -static void -_evas_common_font_int_clear(RGBA_Font_Int *fi) -{ - int i, j, k; - - LKL(fi->ft_mutex); - if (!fi->fash) - { - LKU(fi->ft_mutex); - return; - } - evas_common_font_int_modify_cache_by(fi, -1); - if (fi->fash) - { - for (k = 0; k <= 0xff; k++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) - { - Fash_Glyph_Map2 *fmap2 = fi->fash->bucket[k]; - if (fmap2) - { - for (j = 0; j <= 0xff; j++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) - { - Fash_Glyph_Map *fmap = fmap2->bucket[j]; - if (fmap) - { - for (i = 0; i <= 0xff; i++) - { - RGBA_Font_Glyph *fg = fmap->item[i]; - if ((fg) && (fg != (void *)(-1))) - { - FT_Done_Glyph(fg->glyph); - /* extension calls */ - if (fg->ext_dat_free) fg->ext_dat_free(fg->ext_dat); - free(fg); - fmap->item[i] = NULL; - } - } - } - } - } - } - fi->fash->freeme(fi->fash); - fi->fash = NULL; - } - if (fi->inuse) fonts_use_usage -= fi->usage; - fi->usage = 0; - LKU(fi->ft_mutex); -} - -static Eina_Bool -_evas_common_font_all_clear_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) -{ - RGBA_Font_Int *fi = data; - _evas_common_font_int_clear(fi); - return 1; -} - -EAPI void -evas_common_font_all_clear(void) -{ - eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL); -} - -void -evas_common_font_int_promote(RGBA_Font_Int *fi) -{ - return; - if (fonts_use_lru == (Eina_Inlist *)fi) return; - if (!fi->inuse) return; - fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); - fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); -} - -void -evas_common_font_int_use_increase(int size) -{ - fonts_use_usage += size; -} - -void -evas_common_font_int_use_trim(void) -{ - Eina_Inlist *l; - - return; - if (fonts_use_usage <= (font_cache << 1)) return; - if (!fonts_use_lru) return; - l = fonts_use_lru->last; - while (l) - { - RGBA_Font_Int *fi = (RGBA_Font_Int *)l; - if (fonts_use_usage <= (font_cache << 1)) break; - // FIXME: del fi->kerning content - _evas_common_font_int_clear(fi); - evas_common_font_int_unload(fi); - evas_common_font_int_promote(fi); - l = l->prev; - } -} - -void -evas_common_font_int_unload(RGBA_Font_Int *fi) -{ - return; - if (!fi->src->ft.face) return; - _evas_common_font_int_clear(fi); - FT_Done_Size(fi->ft.size); - fi->ft.size = NULL; - evas_common_font_source_unload(fi->src); -} - -void -evas_common_font_int_reload(RGBA_Font_Int *fi) -{ - if (fi->src->ft.face) return; - evas_common_font_source_load_complete(fi->src); - return; - evas_common_font_source_reload(fi->src); - evas_common_font_int_load_complete(fi); -} - -/* when the fi->references == 0 we increase this instead of really deleting - * we then check if the cache_useage size is larger than allowed - * !If the cache is NOT too large we dont delete font_int - * !If the cache is too large we really delete font_int */ -EAPI void -evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir) -{ - font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage + - sizeof(FT_FaceRec) + 16384); /* fudge values */ -} - -EAPI int -evas_common_font_cache_get(void) -{ - return font_cache; -} - -EAPI void -evas_common_font_cache_set(int size) -{ - font_cache = size; - evas_common_font_flush(); - evas_common_font_int_use_trim(); -} - -EAPI void -evas_common_font_flush(void) -{ - if (font_cache_usage < font_cache) return; - while (font_cache_usage > font_cache) - { - int pfont_cache_usage; - - pfont_cache_usage = font_cache_usage; - evas_common_font_flush_last(); - if (pfont_cache_usage == font_cache_usage) break; - } -} - -/* We run this when the cache gets larger than allowed size - * We check cache size each time a fi->references goes to 0 - * PERFORMS: Find font_int(s) with references == 0 and delete them */ -EAPI void -evas_common_font_flush_last(void) -{ - RGBA_Font_Int *fi = NULL; - - if (!fonts_lru) return ; - fi = eina_list_data_get(fonts_lru); - fonts_lru = eina_list_remove_list(fonts_lru, fonts_lru); - eina_hash_del(fonts, fi, fi); -} - -EAPI RGBA_Font_Int * -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; - RGBA_Font_Int *fi; - - 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) - { - if (fi->references == 0) - { - evas_common_font_int_modify_cache_by(fi, -1); - fonts_lru = eina_list_remove(fonts_lru, fi); - } - fi->references++; - } - eina_stringshare_del(tmp_fn.name); - return fi; -} diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c deleted file mode 100644 index 7b3dabe..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_main.c +++ /dev/null @@ -1,545 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -#include "evas_font_private.h" - -#include FT_OUTLINE_H - -FT_Library evas_ft_lib = 0; -static int initialised = 0; - -LK(lock_font_draw); // for freetype2 API calls -LK(lock_bidi); // for evas bidi internal usage. -LK(lock_ot); // for evas bidi internal usage. - -EAPI void -evas_common_font_init(void) -{ - int error; - const char *s; - - initialised++; - if (initialised != 1) return; - error = FT_Init_FreeType(&evas_ft_lib); - if (error) return; - evas_common_font_load_init(); - evas_common_font_draw_init(); - s = getenv("EVAS_FONT_DPI"); - if (s) - { - int dpi = atoi(s); - - if (dpi > 0) evas_common_font_dpi_set(dpi); - } - LKI(lock_font_draw); - LKI(lock_bidi); - LKI(lock_ot); -} - -EAPI void -evas_common_font_shutdown(void) -{ - if (initialised < 1) return; - initialised--; - if (initialised != 0) return; - - LKD(lock_font_draw); - LKD(lock_bidi); - LKD(lock_ot); - - evas_common_font_load_shutdown(); - evas_common_font_cache_set(0); - evas_common_font_flush(); - - FT_Done_FreeType(evas_ft_lib); -#ifdef EVAS_FRAME_QUEUING - evas_common_font_draw_finish(); -#endif - evas_ft_lib = 0; -} - -EAPI void -evas_common_font_font_all_unload(void) -{ - evas_common_font_all_clear(); -} - -EAPI int -evas_common_font_ascent_get(RGBA_Font *fn) -{ - int val; - RGBA_Font_Int *fi; - -// evas_common_font_size_use(fn); -#if 0 - { - Eina_List *l; - - EINA_LIST_FOREACH(fn->fonts, l, fi) - { - if (!fi->src->ft.face) continue; - if (fi->src->current_size != fi->size) - { - FTLOCK(); - FT_Activate_Size(fi->ft.size); - FTUNLOCK(); - fi->src->current_size = fi->size; - } - val = (int)fi->src->ft.face->size->metrics.ascender; - if (fi->src->ft.face->units_per_EM == 0) - return val; - dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; - ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); - printf(" ==== %p: %i\n", fi, ret); - } - } -#endif - fi = fn->fonts->data; - 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 (!FT_IS_SCALABLE(fi->src->ft.face)) - { - WRN("NOT SCALABLE!"); - } - val = (int)fi->src->ft.face->size->metrics.ascender; - return val >> 6; -// printf("%i | %i\n", val, val >> 6); -// if (fi->src->ft.face->units_per_EM == 0) -// return val; -// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; -// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); -// return ret; -} - -EAPI int -evas_common_font_descent_get(RGBA_Font *fn) -{ - int val; - RGBA_Font_Int *fi; - -// evas_common_font_size_use(fn); - fi = fn->fonts->data; - 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; - } - val = -(int)fi->src->ft.face->size->metrics.descender; - return val >> 6; -// if (fi->src->ft.face->units_per_EM == 0) -// return val; -// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; -// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); -// return ret; -} - -EAPI int -evas_common_font_max_ascent_get(RGBA_Font *fn) -{ - int val, dv; - int ret; - RGBA_Font_Int *fi; - -// evas_common_font_size_use(fn); - fi = fn->fonts->data; - 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; - } - val = (int)fi->src->ft.face->bbox.yMax; - if (fi->src->ft.face->units_per_EM == 0) - return val; - dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; - ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); - return ret; -} - -EAPI int -evas_common_font_max_descent_get(RGBA_Font *fn) -{ - int val, dv; - int ret; - RGBA_Font_Int *fi; - -// evas_common_font_size_use(fn); - fi = fn->fonts->data; - 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; - } - val = -(int)fi->src->ft.face->bbox.yMin; - if (fi->src->ft.face->units_per_EM == 0) - return val; - dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; - ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); - return ret; -} - -EAPI int -evas_common_font_get_line_advance(RGBA_Font *fn) -{ - int val; - RGBA_Font_Int *fi; - -// evas_common_font_size_use(fn); - fi = fn->fonts->data; - 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; - } - val = (int)fi->src->ft.face->size->metrics.height; - if (fi->src->ft.face->units_per_EM == 0) - return val; - return val >> 6; -// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; -// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); -// 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_SLANT) - 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_WEIGHT) - 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; -} diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.c b/libraries/evas/src/lib/engines/common/evas_font_ot.c deleted file mode 100644 index 2912d55..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_ot.c +++ /dev/null @@ -1,336 +0,0 @@ -#include "evas_font_ot.h" - -#ifdef USE_HARFBUZZ -# include -# include -#endif - -#include "evas_common.h" - -#include -#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 -evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index) -{ - int i; - int items; - int left_bound, right_bound; - size_t base_cluster; - char_index += props->start; - base_cluster = EVAS_FONT_OT_POS_GET(props->info->ot[char_index]); - for (i = (int) char_index ; - (i >= (int) props->start) && - (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; - i--) - ; - left_bound = i; - for (i = (int) char_index + 1; - (i < (int) (props->start + props->len)) && - (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; - i++) - ; - right_bound = i; - - if (right_bound == left_bound) - { - items = 1; - } - else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - if (left_bound < 0) - { - items = props->text_offset + props->text_len - base_cluster; - } - else - { - items = props->info->ot[left_bound].source_cluster - base_cluster; - } - } - else - { - if (right_bound >= (int) (props->text_offset + props->text_len)) - { - items = props->text_offset + props->text_len - base_cluster; - } - else - { - items = props->info->ot[right_bound].source_cluster - base_cluster; - } - } - return (items > 0) ? items : 1; -} - -/* Harfbuzz font functions */ - -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 *) font_data; - RGBA_Font_Glyph *fg; - (void) font; - (void) user_data; - fg = evas_common_font_int_cache_glyph_get(fi, glyph); - if (fg) - { - return fg->glyph->advance.x >> 10; - } - return 0; -} - -static hb_position_t -_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 *) font_data; - int kern; - (void) font; - (void) user_data; - if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern)) - return kern; - - return 0; -} - -/* End of harfbuzz font funcs */ - -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) - { - font_funcs = hb_font_funcs_create(); - 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) -{ - /* Create hb_font if not previously created */ - if (!fi->ft.hb_font) - { - hb_font_t *hb_ft_font; - - hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL); - fi->ft.hb_font = hb_font_create_sub_font(hb_ft_font); - hb_font_destroy(hb_ft_font); - - hb_font_set_funcs(fi->ft.hb_font, - _evas_common_font_ot_font_funcs_get(), fi, NULL); - } - - hb_shape(fi->ft.hb_font, buffer, NULL, 0); -} - -EAPI Eina_Bool -evas_common_font_ot_populate_text_props(const Eina_Unicode *text, - Evas_Text_Props *props, int len) -{ - RGBA_Font_Int *fi; - hb_buffer_t *buffer; - hb_glyph_position_t *positions; - hb_glyph_info_t *infos; - int slen; - unsigned int i; - Evas_Font_Glyph_Info *gl_itr; - Evas_Font_OT_Info *ot_itr; - Evas_Coord pen_x = 0; - - fi = props->font_instance; - - if (len < 0) - { - slen = eina_unicode_strlen(text); - } - else - { - slen = len; - } - - buffer = hb_buffer_create(); - 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(), -1)); - 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); - /* FIXME: add run-time conversions if needed, which is very unlikely */ - hb_buffer_add_utf32(buffer, (const uint32_t *) text, slen, 0, slen); - - _evas_common_font_ot_shape(buffer, fi); - - props->len = hb_buffer_get_length(buffer); - props->info->ot = calloc(props->len, - sizeof(Evas_Font_OT_Info)); - props->info->glyph = calloc(props->len, - sizeof(Evas_Font_Glyph_Info)); - 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; - adv = positions->x_advance; - - pen_x += adv; - gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); - - ot_itr++; - gl_itr++; - infos++; - positions++; - } - - hb_buffer_destroy(buffer); - evas_common_font_int_use_trim(); - - return EINA_FALSE; -} - -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_font_ot.h b/libraries/evas/src/lib/engines/common/evas_font_ot.h deleted file mode 100644 index bc5ab02..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_ot.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _EVAS_FONT_OT_H -# define _EVAS_FONT_OT_H - -# ifdef HAVE_CONFIG_H -# include "config.h" -# endif - -# ifdef HAVE_HARFBUZZ -# define OT_SUPPORT -# define USE_HARFBUZZ -# endif - -# ifdef OT_SUPPORT -# include -typedef struct _Evas_Font_OT_Info Evas_Font_OT_Info; -# else -typedef void *Evas_Font_OT_Info; -# endif - -# include "Evas.h" - -# ifdef OT_SUPPORT -struct _Evas_Font_OT_Info -{ - size_t source_cluster; - Evas_Coord x_offset; - Evas_Coord y_offset; -}; -# endif - -# ifdef OT_SUPPORT -# define EVAS_FONT_OT_X_OFF_GET(a) ((a).x_offset) -# define EVAS_FONT_OT_Y_OFF_GET(a) ((a).y_offset) -# define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster) -# endif - -# 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(const Eina_Unicode *text, - Evas_Text_Props *props, int len); -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_font_private.h b/libraries/evas/src/lib/engines/common/evas_font_private.h deleted file mode 100644 index eed3faf..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_private.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _EVAS_FONT_PRIVATE_H -# define _EVAS_FONT_PRIVATE_H -#include "evas_font_ot.h" - -#ifdef BUILD_PTHREAD -extern LK(lock_font_draw); // for freetype2 API calls -extern LK(lock_bidi); // for fribidi API calls -extern LK(lock_ot); // for harfbuzz calls -#endif - -# if defined(EVAS_FRAME_QUEUING) || defined(BUILD_PIPE_RENDER) -# define FTLOCK() LKL(lock_font_draw) -# define FTUNLOCK() LKU(lock_font_draw) - -# define BIDILOCK() LKL(lock_bidi) -# define BIDIUNLOCK() LKU(lock_bidi) - -# define OTLOCK() LKL(lock_ot) -# define OTUNLOCK() LKU(lock_ot) -# else -# define FTLOCK(x) -# define FTUNLOCK(x) - -# define BIDILOCK() -# define BIDIUNLOCK() - -/* Macros for text walking */ -# define OTLOCK() -# define OTUNLOCK() -# endif - -void evas_common_font_source_unload(RGBA_Font_Source *fs); -void evas_common_font_source_reload(RGBA_Font_Source *fs); - -void evas_common_font_int_promote(RGBA_Font_Int *fi); -void evas_common_font_int_use_increase(int size); -void evas_common_font_int_use_trim(void); -void evas_common_font_int_unload(RGBA_Font_Int *fi); -void evas_common_font_int_reload(RGBA_Font_Int *fi); - -/* 6th bit is on is the same as frac part >= 0.5 */ -# define EVAS_FONT_ROUND_26_6_TO_INT(x) \ - (((x + 0x20) & -0x40) >> 6) - -# define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \ - ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \ - ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \ - ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \ - ) - -# include "evas_font_default_walk.x" -#endif /* !_EVAS_FONT_PRIVATE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_font_query.c b/libraries/evas/src/lib/engines/common/evas_font_query.c deleted file mode 100644 index af2cc84..0000000 --- a/libraries/evas/src/lib/engines/common/evas_font_query.c +++ /dev/null @@ -1,789 +0,0 @@ -#include "evas_common.h" -#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ -#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_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; - } - } - - /* Abort if we reached the end */ - if (itr == run_end) - break; - - /* If the script font doesn't fit even one char, find a new font. */ - if (itr == text) - { - /* 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; - - key[0] = left; - key[1] = right; - - result = eina_hash_find(fi->kerning, key); - if (result) - { - *kerning = result[2]; - goto on_correct; - } - - /* NOTE: ft2 seems to have a bug. and sometimes returns bizarre - * values to kern by - given same font, same size and same - * prev_index and index. auto/bytecode or none hinting doesn't - * matter */ - evas_common_font_int_reload(fi); - FTLOCK(); - if (FT_Get_Kerning(fi->src->ft.face, - key[0], key[1], - FT_KERNING_DEFAULT, &delta) == 0) - { - int *push; - - FTUNLOCK(); - *kerning = delta.x; - - push = malloc(sizeof (int) * 3); - if (!push) return 1; - - push[0] = key[0]; - push[1] = key[1]; - push[2] = *kerning; - - eina_hash_direct_add(fi->kerning, push, push); - - goto on_correct; - } - - FTUNLOCK(); - error = 0; - - on_correct: - return error; -} - -/** - * @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) -{ - if (!text_props->len) return 0; - return text_props->info->glyph[text_props->start].x_bear; -} - -/** - * @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) -{ - const Evas_Font_Glyph_Info *gli; - if (!text_props->len) return 0; - gli = text_props->info->glyph + text_props->start + text_props->len - 1; - - /* If the last char is a whitespace, we use the advance as the size, - * so the right_inset is 0. */ - if (gli->width == 0) - return 0; - - return ((gli > text_props->info->glyph) ? - gli->pen_after - (gli - 1)->pen_after : gli->pen_after) - - (gli->width + gli->x_bear -#ifdef OT_SUPPORT - + 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 - ); -} - -/** - * @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 Evas_Text_Props *text_props, int *w, int *h) -{ - Evas_Coord ret_w = 0; - - if (text_props->len > 0) - { - const Evas_Font_Glyph_Info *glyph = text_props->info->glyph + - text_props->start; - const Evas_Font_Glyph_Info *last_glyph = glyph; - - 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); -} - -/** - * @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 Evas_Text_Props *text_props, int *h_adv, int *v_adv) -{ - Evas_Coord ret_adv = 0; - if (text_props->len > 0) - { - 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; - } - - if (h_adv) *h_adv = ret_adv; - if (v_adv) *v_adv = evas_common_font_get_line_advance(fn); -} - -/** - * @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 Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) -{ - int asc, desc; - size_t position = 0; - int ret_val = 0; - EVAS_FONT_WALK_TEXT_INIT(); - - asc = evas_common_font_max_ascent_get(fn); - desc = evas_common_font_max_descent_get(fn); - - position = pos; - /* If it's the null, choose location according to the direction. */ - if (position == text_props->text_len) - { - /* if it's rtl then the location is the left of the string, - * otherwise, the right. */ -#ifdef BIDI_SUPPORT - if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - if (cx) *cx = 0; - if (ch) *ch = asc + desc; - } - else -#endif - { - evas_common_font_query_advance(fn, text_props, cx, ch); - } - if (cy) *cy = 0; - if (cw) *cw = 0; - ret_val = 1; - goto end; - } - - Evas_Coord cluster_start = 0, last_end = 0; - int prev_cluster = -1; - int found = 0, items = 1, item_pos = 1; - int last_is_visible = 0; - EVAS_FONT_WALK_TEXT_START() - { - EVAS_FONT_WALK_TEXT_WORK(); - - if (prev_cluster != (int) EVAS_FONT_WALK_POS) - { - if (found) - { - break; - } - else - { - cluster_start = EVAS_FONT_WALK_PEN_X + - EVAS_FONT_WALK_X_OFF + - EVAS_FONT_WALK_X_BEAR; - } - } - last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; - last_end = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + - EVAS_FONT_WALK_X_BEAR + EVAS_FONT_WALK_WIDTH; - /* we need to see if the char at the visual position is the char wanted */ - if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && - (EVAS_FONT_WALK_POS <= (size_t) position) && - ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || - (EVAS_FONT_WALK_IS_LAST))) - { - found = 1; -#ifdef OT_SUPPORT - items = evas_common_font_ot_cluster_size_get(text_props, - char_index); -#endif - item_pos = position - EVAS_FONT_WALK_POS + 1; - } - else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && - ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || - (EVAS_FONT_WALK_IS_FIRST)) && - (((size_t) position) >= EVAS_FONT_WALK_POS)) - { - found = 1; -#ifdef OT_SUPPORT - items = evas_common_font_ot_cluster_size_get(text_props, - char_index); -#endif - item_pos = items - (position - EVAS_FONT_WALK_POS); - } - - prev_cluster = EVAS_FONT_WALK_POS; - } - EVAS_FONT_WALK_TEXT_END(); - if (found) - { - Evas_Coord cluster_w; - cluster_w = last_end - cluster_start; - if (cy) *cy = -asc; - if (ch) *ch = asc + desc; - if (last_is_visible) - { - if (cx) *cx = cluster_start + - (cluster_w / items) * - (item_pos - 1); - if (cw) *cw = (cluster_w / items); - } - else - { - if (cx) *cx = cluster_start; - if (cw) *cw = 0; - } - ret_val = 1; - goto end; - } -end: - - return ret_val; -} - -/** - * @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 Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) -{ - int asc, desc; - size_t position; - int ret_val = 0; - EVAS_FONT_WALK_TEXT_INIT(); - - asc = evas_common_font_max_ascent_get(fn); - desc = evas_common_font_max_descent_get(fn); - - position = pos; - /* If it's the null, choose location according to the direction. */ - if (position == text_props->text_len) - { - /* if it's rtl then the location is the left of the string, - * otherwise, the right. */ -#ifdef BIDI_SUPPORT - if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - if (cpen_x) *cpen_x = 0; - if (ch) *ch = asc + desc; - } - else -#endif - { - evas_common_font_query_advance(fn, text_props, cpen_x, ch); - } - if (cy) *cy = 0; - if (cadv) *cadv = 0; - ret_val = 1; - goto end; - } - Evas_Coord cluster_start = 0; - int prev_cluster = -1; - int found = 0, items = 1, item_pos = 1; - int last_is_visible = 0; - EVAS_FONT_WALK_TEXT_START() - { - EVAS_FONT_WALK_TEXT_WORK(); - - if (prev_cluster != (int) EVAS_FONT_WALK_POS) - { - if (found) - { - break; - } - else - { - cluster_start = EVAS_FONT_WALK_PEN_X; - } - } - last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; - - if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && - (EVAS_FONT_WALK_POS <= (size_t) position) && - ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || - (EVAS_FONT_WALK_IS_LAST))) - { - found = 1; -#ifdef OT_SUPPORT - items = evas_common_font_ot_cluster_size_get(text_props, - char_index); -#endif - item_pos = position - EVAS_FONT_WALK_POS + 1; - } - else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && - ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || - (EVAS_FONT_WALK_IS_FIRST)) && - (((size_t) position) >= EVAS_FONT_WALK_POS)) - { - found = 1; -#ifdef OT_SUPPORT - items = evas_common_font_ot_cluster_size_get(text_props, - char_index); -#endif - item_pos = items - (position - EVAS_FONT_WALK_POS); - } - - prev_cluster = EVAS_FONT_WALK_POS; - } - EVAS_FONT_WALK_TEXT_END(); - - if (found) - { - Evas_Coord cluster_adv; - cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; - if (cy) *cy = -asc; - if (ch) *ch = asc + desc; - if (last_is_visible) - { - if (cpen_x) *cpen_x = cluster_start + - (cluster_adv / items) * - (item_pos - 1); - if (cadv) *cadv = (cluster_adv / items); - } - else - { - if (cpen_x) *cpen_x = EVAS_FONT_WALK_PEN_X; - if (cadv) *cadv = 0; - } - ret_val = 1; - goto end; - } -end: - - return ret_val; -} - -/** - * @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 Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) -{ - int asc, desc; - int ret_val = -1; - EVAS_FONT_WALK_TEXT_INIT(); - - asc = evas_common_font_max_ascent_get(fn); - desc = evas_common_font_max_descent_get(fn); - Evas_Coord cluster_start = 0; - int prev_cluster = -1; - int found = 0, items = 1; - EVAS_FONT_WALK_TEXT_START() - { - EVAS_FONT_WALK_TEXT_WORK(); - if (prev_cluster != (int) EVAS_FONT_WALK_POS) - { - if (found) - { - break; - } - else - { - cluster_start = EVAS_FONT_WALK_PEN_X; - } - } - - if (!EVAS_FONT_WALK_IS_VISIBLE) continue; - - /* 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_AFTER)) && (y >= -asc) && (y <= desc)) - { -#ifdef OT_SUPPORT - items = evas_common_font_ot_cluster_size_get(text_props, - char_index); -#endif - found = 1; - } - - prev_cluster = EVAS_FONT_WALK_POS; - } - EVAS_FONT_WALK_TEXT_END(); - if (found) - { - int item_pos; - Evas_Coord cluster_adv; - cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; - - if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) - { - double part; - part = cluster_adv / items; - item_pos = (int) ((x - cluster_start) / part); - } - else - { - double part; - part = cluster_adv / items; - item_pos = items - ((int) ((x - cluster_start) / part)) - 1; - } - if (cx) *cx = EVAS_FONT_WALK_PEN_X + - ((cluster_adv / items) * (item_pos - 1)); - if (cy) *cy = -asc; - if (cw) *cw = (cluster_adv / items); - if (ch) *ch = asc + desc; - ret_val = prev_cluster + item_pos; - goto end; - } -end: - - return ret_val; -} - -/** - * @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 Evas_Text_Props *text_props, int x, int y) -{ - int asc, desc; - int ret=-1; - - asc = evas_common_font_max_ascent_get(fn); - desc = evas_common_font_max_descent_get(fn); - -#ifdef BIDI_SUPPORT - if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - Evas_Font_Glyph_Info *gli = NULL; - Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0; - int i; - - if ((text_props->info) && (text_props->len > 0)) - { - gli = text_props->info->glyph + text_props->start; - 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; - } - } - } - } - 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: - - return ret; -} - diff --git a/libraries/evas/src/lib/engines/common/evas_image.h b/libraries/evas/src/lib/engines/common/evas_image.h deleted file mode 100644 index 300697c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _EVAS_IMAGE_H -#define _EVAS_IMAGE_H - - -EAPI void evas_common_image_init (void); -EAPI void evas_common_image_shutdown (void); - -EAPI void evas_common_image_image_all_unload (void); - -EAPI void evas_common_rgba_image_free (Image_Entry *ie); -EAPI void evas_common_rgba_image_unload (Image_Entry *ie); -EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im); -EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im); -EAPI void evas_common_image_cache_free (void); /*2*/ -EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/ -EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/ -/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */ -/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */ -EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha); -EAPI Evas_Cache_Image *evas_common_image_cache_get (void); - -EAPI void evas_common_image_set_cache (unsigned int size); -EAPI int evas_common_image_get_cache (void); - -EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len); -EAPI void evas_common_image_line_buffer_release (RGBA_Image *im); - -EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len); -EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im); -EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im); - -EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); -EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress); - -EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size); -EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void); -EAPI void evas_common_rgba_image_scalecache_flush(void); -EAPI void evas_common_rgba_image_scalecache_dump(void); -EAPI void - evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, 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_rgba_image_scalecache_do(Image_Entry *ie, 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 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); -EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num); - -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 */ diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c deleted file mode 100644 index 2815ff8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_data.c +++ /dev/null @@ -1,151 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#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) -{ - RGBA_Image *dst = (RGBA_Image *) ie_dst; - - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - dst->cache_entry.w = w; - dst->cache_entry.h = h; - dst->image.data = image_data; - dst->image.no_free = 1; - dst->cache_entry.flags.alpha = alpha ? 1 : 0; - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - case EVAS_COLORSPACE_YCBCR422601_PL: - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - w &= ~0x1; - dst->cache_entry.w = w; - dst->cache_entry.h = h; - dst->cs.data = image_data; - dst->cs.no_free = 1; - break; - default: - abort(); - break; - } - dst->cache_entry.space = cspace; - evas_common_image_colorspace_dirty(dst); - _evas_common_rgba_image_post_surface(ie_dst); - return 0; -} - -int -evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace) -{ - RGBA_Image *dst = (RGBA_Image *) ie_dst; - - /* FIXME: Is dst->image.data valid. */ - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - dst->cache_entry.flags.alpha = alpha ? 1 : 0; - if (image_data) - memcpy(dst->image.data, image_data, w * h * sizeof(DATA32)); - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - case EVAS_COLORSPACE_YCBCR422601_PL: - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2); - if (image_data && (dst->cs.data)) - memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2); - break; - default: - abort(); - break; - } - - dst->cache_entry.space = cspace; - evas_common_image_colorspace_dirty(dst); - _evas_common_rgba_image_post_surface(ie_dst); - return 0; -} - -int -evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__) -{ - RGBA_Image *dst = (RGBA_Image *) ie_dst; - RGBA_Image *im = (RGBA_Image *) ie_im; - - if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) || - (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) || - (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) || - (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) || - (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL)) - { - w &= ~0x1; - dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); - } - - dst->flags = im->flags; - dst->cs.no_free = 0; - evas_common_image_colorspace_dirty(dst); - - _evas_common_rgba_image_post_surface(ie_dst); - return 0; -} - -int -evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace) -{ - RGBA_Image *dst = (RGBA_Image *) ie_dst; - - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - if (dst->cs.data) - { - if (!dst->cs.no_free) free(dst->cs.data); - dst->cs.data = NULL; - dst->cs.no_free = 0; - } - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - case EVAS_COLORSPACE_YCBCR422601_PL: - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - if (dst->image.no_free) - { - ie_dst->allocated.w = 0; - ie_dst->allocated.h = 0; -#ifdef BUILD_ASYNC_PRELOAD - ie_dst->flags.preload_done = 0; -#endif - ie_dst->flags.loaded = 0; - dst->image.data = NULL; - dst->image.no_free = 0; - /* FIXME: Must allocate image.data surface cleanly. */ - } - if (dst->cs.data) - { - if (!dst->cs.no_free) free(dst->cs.data); - } - dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); - dst->cs.no_free = 0; - break; - default: - abort(); - break; - } - dst->cache_entry.space = cspace; - evas_common_image_colorspace_dirty(dst); - - _evas_common_rgba_image_post_surface(ie_dst); - return 0; -} diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c deleted file mode 100644 index 21ac5d4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_load.c +++ /dev/null @@ -1,385 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#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[] = -{ /* 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[] = -{ /* 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 -{ - Image_Entry *ie; - int *error; - Evas_Module *em; -}; - - -static Eina_Bool -_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) -{ - Evas_Image_Load_Func *evas_image_load_func = NULL; - Evas_Module *em = data; - struct evas_image_foreach_loader_data *d = fdata; - Image_Entry *ie = d->ie; - - if (!evas_module_load(em)) return EINA_TRUE; - evas_image_load_func = em->functions; - evas_module_use(em); - *(d->error) = EVAS_LOAD_ERROR_NONE; - if (evas_image_load_func && - evas_image_load_func->file_head(ie, ie->file, ie->key, d->error) && - (*(d->error) == EVAS_LOAD_ERROR_NONE)) - { - d->em = em; - return EINA_FALSE; - } - - return EINA_TRUE; -} - -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, *end; - Evas_Module *em; - struct stat st; - unsigned int i; - int len, ret = EVAS_LOAD_ERROR_NONE; - struct evas_image_foreach_loader_data fdata; - - -#ifdef EVAS_CSERVE - if (evas_cserve_use_get()) - { - // TODO: handle errors from server and return them? - DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : ""); - if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts))) - { - DBG("try cserve '%s' '%s' loaded!", - ie->file, ie->key ? ie->key : ""); - return EVAS_LOAD_ERROR_NONE; - } - } -#endif - if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode)) - { - 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) - { - em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loader); - if (em) - { - DBG("found image loader '%s' (%p)", loader, em); - if (evas_module_load(em)) - { - evas_module_use(em); - evas_image_load_func = em->functions; - ret = EVAS_LOAD_ERROR_NONE; - if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) - { - DBG("loaded file head using module '%s' (%p): %s", - loader, em, ie->file); - goto end; - } - evas_module_unload(em); - INF("failed to load file head using module '%s' (%p): " - "%s (%s)", - loader, em, ie->file, evas_load_error_str(ret)); - } - else - WRN("failed to load module '%s' (%p)", loader, em); - } - else - INF("image loader '%s' is not enabled or missing!", loader); - } - - fdata.ie = ie; - fdata.error = &ret; - fdata.em = NULL; - ret = EVAS_LOAD_ERROR_NONE; - evas_module_foreach_image_loader(_evas_image_foreach_loader, &fdata); - em = fdata.em; - evas_image_load_func = em ? em->functions : NULL; - if (em) goto end; - - /* This is our last chance, try all known image loader. */ - /* FIXME: We could use eina recursive module search ability. */ - for (i = 0; i < sizeof (loaders_name) / sizeof (char *); i++) - { - em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loaders_name[i]); - if (em) - { - if (evas_module_load(em)) - { - evas_module_use(em); - evas_image_load_func = em->functions; - ret = EVAS_LOAD_ERROR_NONE; - if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) - { - DBG("brute force loader '%s' (%p) worked on %s", - loaders_name[i], em, ie->file); - goto end; - } - else - INF("brute force loader '%s' (%p) failed on %s (%s)", - loaders_name[i], em, ie->file, - evas_load_error_str(ret)); - - evas_module_unload(em); - } - else - INF("failed to load module '%s' (%p)", loaders_name[i], em); - } - else - DBG("could not find module '%s'", loaders_name[i]); - } - - INF("exhausted all means to load image '%s'", ie->file); - return EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - - end: - - if (ret != EVAS_LOAD_ERROR_NONE) - { - const char *modname = NULL; - int modversion = -1; - if (em && em->definition) - { - modname = em->definition->name; - modversion = em->definition->version; - } - WRN("loader '%s' (version %d) " - "handled file '%s', key '%s' with errors: %s", - modname ? modname : "", modversion, - ie->file, ie->key ? ie->key : "", - evas_load_error_str(ret)); - goto end; - } - - DBG("loader '%s' used for file %s", - (em && em->definition && em->definition->name) ? - em->definition->name : "", - ie->file); - - ie->info.module = (void*) em; - ie->info.loader = (void*) evas_image_load_func; - evas_module_ref((Evas_Module*) ie->info.module); - return ret; -} - -EAPI int -evas_common_load_rgba_image_data_from_file(Image_Entry *ie) -{ - Evas_Image_Load_Func *evas_image_load_func = NULL; - int ret = EVAS_LOAD_ERROR_NONE; - - if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC; - -#ifdef EVAS_CSERVE - if (ie->data1) - { - if (evas_cserve_image_data_load(ie)) - { - RGBA_Image *im = (RGBA_Image *)ie; - Mem *mem = ie->data2; - if (mem) - { - im->image.data = (void*) (mem->data + mem->offset); - im->image.no_free = 1; - return EVAS_LOAD_ERROR_NONE; - } - } - return EVAS_LOAD_ERROR_GENERIC; - } -#endif - - if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC; - -// printf("load data [%p] %s %s\n", ie, ie->file, ie->key); - - evas_image_load_func = ie->info.loader; - evas_module_use((Evas_Module*) ie->info.module); - if (!evas_image_load_func->file_data(ie, ie->file, ie->key, &ret)) - { - return ret; - } - -// evas_module_unref((Evas_Module*) ie->info.module); -// ie->info.module = NULL; - - return EVAS_LOAD_ERROR_NONE; -} - -EAPI double -evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num) -{ - Evas_Image_Load_Func *evas_image_load_func = NULL; - - if (!ie->info.module) return -1; - - evas_image_load_func = ie->info.loader; - evas_module_use((Evas_Module*) ie->info.module); - if (evas_image_load_func->frame_duration) - return evas_image_load_func->frame_duration(ie, ie->file, start, frame_num); - return -1; -} - -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; -} diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c deleted file mode 100644 index 9c233b3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_main.c +++ /dev/null @@ -1,889 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Eet.h is correctly defined */ -#endif - -#ifdef BUILD_LOADER_EET -# include -#endif - -#include "evas_common.h" -#include "evas_private.h" -#include "evas_image_private.h" -#include "evas_convert_yuv.h" -#include "evas_cs.h" - -#ifdef HAVE_VALGRIND -# include -#endif - -//#define SURFDBG 1 - -static Evas_Cache_Image * eci = NULL; -static int reference = 0; - -/* static RGBA_Image *evas_rgba_line_buffer = NULL; */ - -#define EVAS_RGBA_LINE_BUFFER_MIN_LEN 256 -#define EVAS_RGBA_LINE_BUFFER_MAX_LEN 2048 - -/* static RGBA_Image *evas_alpha_line_buffer = NULL; */ - -#define EVAS_ALPHA_LINE_BUFFER_MIN_LEN 256 -#define EVAS_ALPHA_LINE_BUFFER_MAX_LEN 2048 - - -static Image_Entry *_evas_common_rgba_image_new(void); -static void _evas_common_rgba_image_delete(Image_Entry *ie); - -static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); -static void _evas_common_rgba_image_surface_delete(Image_Entry *ie); -static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie); - -static void _evas_common_rgba_image_unload(Image_Entry *im); - -static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); - -static int _evas_common_rgba_image_ram_usage(Image_Entry *ie); - -/* Only called when references > 0. Need to provide a fresh copie of im. */ -/* The destination surface does have a surface, but no allocated pixel data. */ -static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src); - -#if 0 -static void -_evas_common_rgba_image_debug(const char* context, Image_Entry *eim) -{ - DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); -} -#endif - -static const Evas_Cache_Image_Func _evas_common_image_func = -{ - _evas_common_rgba_image_new, - _evas_common_rgba_image_delete, - _evas_common_rgba_image_surface_alloc, - _evas_common_rgba_image_surface_delete, - _evas_common_rgba_image_surface_pixels, - evas_common_load_rgba_image_module_from_file, - _evas_common_rgba_image_unload, - _evas_common_rgba_image_dirty_region, - _evas_common_rgba_image_dirty, - evas_common_rgba_image_size_set, - evas_common_rgba_image_from_copied_data, - evas_common_rgba_image_from_data, - evas_common_rgba_image_colorspace_set, - evas_common_load_rgba_image_data_from_file, - _evas_common_rgba_image_ram_usage, -/* _evas_common_rgba_image_debug */ - NULL -}; - -EAPI void -evas_common_image_init(void) -{ - if (!eci) - eci = evas_cache_image_init(&_evas_common_image_func); - reference++; -//// ERR("REF++=%i", reference); - -#ifdef BUILD_LOADER_EET - eet_init(); -#endif - evas_common_scalecache_init(); -} - -EAPI void -evas_common_image_shutdown(void) -{ - if (--reference == 0) - { -//// printf("REF--=%i\n", reference); -// DISABLE for now - something wrong with cache shutdown freeing things -// still in use - rage_thumb segv's now. -// -// actually - i think i see it. cache ref goes to 0 (and thus gets freed) -// because in eng_setup() when a buffer changes size it is FIRST freed -// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately -// where it should stay at 1. - see evas_engine.c in the buffer enigne for -// example. eng_output_free() is called BEFORE _output_setup(). although this -// is only a SIGNE of the problem. we can patch this up with either freeing -// after the setup (so we just pt a ref of 2 then back to 1), or just -// evas_common_image_init() at the start and evas_common_image_shutdown() -// after it all. really ref 0 should only be reached when no more canvases -// with no more objects exist anywhere. - -// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. - evas_cache_image_shutdown(eci); - eci = NULL; - } - -#ifdef BUILD_LOADER_EET - eet_shutdown(); -#endif - evas_common_scalecache_shutdown(); -} - -EAPI void -evas_common_image_image_all_unload(void) -{ - evas_common_rgba_image_scalecache_dump(); - evas_cache_image_unload_all(eci); -} - -static Image_Entry * -_evas_common_rgba_image_new(void) -{ - RGBA_Image *im; - - im = calloc(1, sizeof(RGBA_Image)); - if (!im) return NULL; - im->flags = RGBA_IMAGE_NOTHING; - im->ref = 1; -#ifdef EVAS_FRAME_QUEUING - LKI(im->cache_entry.ref_fq_add); - LKI(im->cache_entry.ref_fq_del); - 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; - -#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); - eina_condition_free(&(im->cache_entry.cond_fq_del)); -# endif -#endif - evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); - if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); - /* memset the image to 0x99 because i recently saw a segv where an - * seemed to be used BUT its contents were wrong - it looks like it was - * overwritten by something from efreet - as there was an execute command - * for a command there and some other signs - but to make sure, I am - * going to empty this struct out in case this happens again so i know - * that something else is overwritign this struct - or not */ -// memset(im, 0x99, sizeof(im)); -#ifdef EVAS_CSERVE - if (ie->data1) evas_cserve_image_free(ie); -#endif -/* - * FIXME: This doesn't seem to be needed... But I'm not sure why. - * -- nash - { - Filtered_Image *fi; - - EINA_LIST_FREE(im->filtered, fi) - { - free(fi->key); - _evas_common_rgba_image_delete((Image_Entry *)(fi->image)); - free(fi); - } - } -*/ - if (ie->frames) - { - Eina_List *l; - Image_Entry_Frame *frame; - EINA_LIST_FOREACH(ie->frames, l, frame) - { - if (frame) - { - if (frame->data) free(frame->data); - if (frame->info) free(frame->info); - free (frame); - } - } - } - free(im); -} - -EAPI void -evas_common_rgba_image_free(Image_Entry *ie) -{ - _evas_common_rgba_image_surface_delete(ie); - _evas_common_rgba_image_delete(ie); -} - -#ifdef SURFDBG -static Eina_List *surfs = NULL; - -static void -surf_debug(void) -{ - Eina_List *l; - Image_Entry *ie; - RGBA_Image *im; - int i = 0; - - printf("----SURFS----\n"); - EINA_LIST_FOREACH(surfs, l, ie) - { - im = ie; - printf("%i - %p - %ix%i [%s][%s]\n", - i, im->image.data, ie->allocated.w, ie->allocated.h, - ie->file, ie->key - ); - i++; - } -} -#endif - -EAPI void -evas_common_rgba_image_unload(Image_Entry *ie) -{ - RGBA_Image *im = (RGBA_Image *) ie; - - if (!ie->flags.loaded) return; - if ((!ie->info.module) && (!ie->data1)) return; - if (!ie->file) return; - - ie->flags.loaded = 0; - - if ((im->cs.data) && (im->image.data)) - { - if (im->cs.data != im->image.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - } - else if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - im->cs.data = NULL; - -#ifdef EVAS_CSERVE - if (ie->data1) - { - evas_cserve_image_useless(ie); - im->image.data = NULL; - ie->allocated.w = 0; - ie->allocated.h = 0; - ie->flags.loaded = 0; -#ifdef BUILD_ASYNC_PRELOAD - ie->flags.preload_done = 0; -#endif - return; - } -#endif - - if (im->image.data && !im->image.no_free) - { - free(im->image.data); -#ifdef SURFDBG - surfs = eina_list_remove(surfs, ie); -#endif - } - im->image.data = NULL; - ie->allocated.w = 0; - ie->allocated.h = 0; - ie->flags.loaded = 0; -#ifdef BUILD_ASYNC_PRELOAD - ie->flags.preload_done = 0; -#endif -#ifdef SURFDBG - surf_debug(); -#endif -} - -void -_evas_common_rgba_image_post_surface(Image_Entry *ie) -{ -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_IMAGE - RGBA_Image *im = (RGBA_Image *)ie; - - if (im->pixman.im) pixman_image_unref(im->pixman.im); - if (im->cache_entry.flags.alpha) - { - im->pixman.im = pixman_image_create_bits - ( -// FIXME: endianess determines this - 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 - (void)ie; -# endif -#else - (void)ie; -#endif -} - -static int -_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) -{ - RGBA_Image *im = (RGBA_Image *) ie; - size_t siz = 0; - -#ifdef EVAS_CSERVE - if (ie->data1) return 0; -#endif - if (im->image.no_free) return 0; - - if (im->flags & RGBA_IMAGE_ALPHA_ONLY) - siz = w * h * sizeof(DATA8); - else - siz = w * h * sizeof(DATA32); - - if (im->image.data) - { - free(im->image.data); -#ifdef SURFDBG - surfs = eina_list_remove(surfs, ie); -#endif - } - im->image.data = malloc(siz); - if (!im->image.data) return -1; - ie->allocated.w = w; - ie->allocated.h = h; -#ifdef SURFDBG - surfs = eina_list_append(surfs, ie); -#endif -#ifdef HAVE_VALGRIND -# ifdef VALGRIND_MAKE_READABLE - VALGRIND_MAKE_READABLE(im->image.data, siz); -# else -# ifdef VALGRIND_MAKE_MEM_DEFINED - VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz); -# endif -# endif -#endif - _evas_common_rgba_image_post_surface(ie); -#ifdef SURFDBG - surf_debug(); -#endif - return 0; -} - -static void -_evas_common_rgba_image_surface_delete(Image_Entry *ie) -{ - RGBA_Image *im = (RGBA_Image *) ie; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_IMAGE - if (im->pixman.im) - { - pixman_image_unref(im->pixman.im); - im->pixman.im = NULL; - } -# endif -#endif - if (ie->file) - DBG("unload: [%p] %s %s", ie, ie->file, ie->key); - if ((im->cs.data) && (im->image.data)) - { - if (im->cs.data != im->image.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - } - else if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - im->cs.data = NULL; - - if (im->image.data && !im->image.no_free) - { - free(im->image.data); -#ifdef SURFDBG - surfs = eina_list_remove(surfs, ie); -#endif - } -#ifdef EVAS_CSERVE - else if (ie->data1) - evas_cserve_image_free(ie); -#endif - - im->image.data = NULL; - ie->allocated.w = 0; - ie->allocated.h = 0; -#ifdef BUILD_ASYNC_PRELOAD - ie->flags.preload_done = 0; -#endif - ie->flags.loaded = 0; - evas_common_rgba_image_scalecache_dirty(&im->cache_entry); -#ifdef SURFDBG - surf_debug(); -#endif -} - -static void -_evas_common_rgba_image_unload(Image_Entry *im) -{ -// DBG("unload: [%p] %s %s", im, im->file, im->key); - evas_common_rgba_image_scalecache_dirty(im); - evas_common_rgba_image_unload(im); -} - -static void -_evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) -{ - RGBA_Image *im = (RGBA_Image *) ie; - -#ifdef EVAS_CSERVE - if (ie->data1) evas_cserve_image_free(ie); -#endif - im->flags |= RGBA_IMAGE_IS_DIRTY; - evas_common_rgba_image_scalecache_dirty(&im->cache_entry); -} - -/* Only called when references > 0. Need to provide a fresh copie of im. */ -static int -_evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) -{ - RGBA_Image *dst = (RGBA_Image *) ie_dst; - RGBA_Image *src = (RGBA_Image *) ie_src; - - evas_common_rgba_image_scalecache_dirty((Image_Entry *)ie_src); - evas_common_rgba_image_scalecache_dirty(ie_dst); - evas_cache_image_load_data(&src->cache_entry); - if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry, - src->cache_entry.w, src->cache_entry.h)) - { -#ifdef EVAS_CSERVE - if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif - return 1; - } - -#ifdef EVAS_CSERVE - if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif - evas_common_image_colorspace_normalize(src); - evas_common_image_colorspace_normalize(dst); -/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ -/* evas_common_cpu_end_opt(); */ - - return 0; -} - -static int -_evas_common_rgba_image_ram_usage(Image_Entry *ie) -{ - RGBA_Image *im = (RGBA_Image *)ie; - int size = sizeof(struct _RGBA_Image); - - if (ie->cache_key) size += strlen(ie->cache_key); - if (ie->file) size += strlen(ie->file); - if (ie->key) size += strlen(ie->key); - - if (im->image.data) - { -#ifdef EVAS_CSERVE - if ((!im->image.no_free) || (ie->data1)) -#else - if ((!im->image.no_free)) -#endif - size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); - } - size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); - return size; -} - -static DATA32 * -_evas_common_rgba_image_surface_pixels(Image_Entry *ie) -{ - RGBA_Image *im = (RGBA_Image *) ie; - - return im->image.data; -} - -#if 0 -void -evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize) -{ - int x, y; - DATA32 *ptr; - - if (is->spans) return; - if (!is->im->cache_entry.flags.alpha) return; - /* FIXME: dont handle alpha only images yet */ - if ((is->im->flags & RGBA_IMAGE_ALPHA_ONLY)) return; - if (tsize < 0) tsize = 0; - is->spans = calloc(1, sizeof(RGBA_Image_Span *) * is->h); - if (!is->spans) return; - ptr = is->data; - for (y = 0; y < is->h; y++) - { - RGBA_Image_Span *sp; - - sp = NULL; - for (x = 0; x < is->w; x++) - { - DATA8 a; - - a = A_VAL(ptr); - if (sp) - { - if (a == 0) - { - is->spans[y] = eina_inlist_append(is->spans[y], sp); - sp = NULL; - } - else - { - sp->w++; - if ((sp->v == 2) && (a != 255)) sp->v = 1; - } - } - else - { - if (a == 255) - { - sp = calloc(1, sizeof(RGBA_Image_Span)); - sp->x = x; - sp->w = 1; - sp->v = 2; - } - else if (a > 0) - { - sp = calloc(1, sizeof(RGBA_Image_Span)); - sp->x = x; - sp->w = 1; - sp->v = 1; - } - } - ptr++; - } - if (sp) - { - is->spans[y] = eina_inlist_append(is->spans[y], sp); - sp = NULL; - } - } -} -#endif - -/* EAPI void */ -/* evas_common_image_surface_dealloc(RGBA_Surface *is) */ -/* { */ -/* if ((is->data) && (!is->no_free)) */ -/* { */ -/* free(is->data); */ -/* is->data = NULL; */ -/* } */ -/* } */ - -static RGBA_Image * -evas_common_image_create(unsigned int w, unsigned int h) -{ - RGBA_Image *im; - - im = (RGBA_Image *) _evas_common_rgba_image_new(); - if (!im) return NULL; - im->cache_entry.w = w; - im->cache_entry.h = h; - if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) - { - _evas_common_rgba_image_delete(&im->cache_entry); - return NULL; - } - im->cache_entry.flags.cached = 0; - return im; -} - -EAPI RGBA_Image * -evas_common_image_alpha_create(unsigned int w, unsigned int h) -{ - RGBA_Image *im; - - im = (RGBA_Image *) _evas_common_rgba_image_new(); - if (!im) return NULL; - im->cache_entry.w = w; - im->cache_entry.h = h; - im->cache_entry.flags.alpha = 1; - if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) - { - _evas_common_rgba_image_delete(&im->cache_entry); - return NULL; - } - im->cache_entry.flags.cached = 0; - return im; -} - -EAPI RGBA_Image * -evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha) -{ - if (alpha) - return evas_common_image_alpha_create(w, h); - return evas_common_image_create(w, h); -} - -void -evas_common_image_colorspace_normalize(RGBA_Image *im) -{ - if ((!im->cs.data) || - ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) return; - switch (im->cache_entry.space) - { - case EVAS_COLORSPACE_ARGB8888: - if (im->image.data != im->cs.data) - { -#ifdef EVAS_CSERVE - if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); -#endif - if (!im->image.no_free) - { - free(im->image.data); -#ifdef SURFDBG - surfs = eina_list_remove(surfs, im); -#endif - ((Image_Entry *)im)->allocated.w = 0; - ((Image_Entry *)im)->allocated.h = 0; - } - im->image.data = im->cs.data; - im->cs.no_free = im->image.no_free; - } - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: -#ifdef BUILD_CONVERT_YUV - if ((im->image.data) && (*((unsigned char **)im->cs.data))) - evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data, - im->cache_entry.w, im->cache_entry.h); -#endif - break; - case EVAS_COLORSPACE_YCBCR422601_PL: -#ifdef BUILD_CONVERT_YUV - if ((im->image.data) && (*((unsigned char **)im->cs.data))) - evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data, - im->cache_entry.w, im->cache_entry.h); -#endif - break; - case EVAS_COLORSPACE_YCBCR420NV12601_PL: -#ifdef BUILD_CONVERT_YUV - if ((im->image.data) && (*((unsigned char **)im->cs.data))) - evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data, - im->cache_entry.w, im->cache_entry.h); -#endif - break; - case EVAS_COLORSPACE_YCBCR420TM12601_PL: -#ifdef BUILD_CONVERT_YUV - if ((im->image.data) && (*((unsigned char **)im->cs.data))) - evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data, - im->cache_entry.w, im->cache_entry.h); -#endif - break; - default: - break; - } - im->cs.dirty = 0; -#ifdef SURFDBG - surf_debug(); -#endif -} - -EAPI void -evas_common_image_colorspace_dirty(RGBA_Image *im) -{ - im->cs.dirty = 1; - evas_common_rgba_image_scalecache_dirty(&im->cache_entry); -} - -EAPI void -evas_common_image_set_cache(unsigned int size) -{ - if (eci) - evas_cache_image_set(eci, size); -} - -EAPI int -evas_common_image_get_cache(void) -{ - return evas_cache_image_get(eci); -} - -EAPI RGBA_Image * -evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) -{ - if (!file) - { - *error = EVAS_LOAD_ERROR_GENERIC; - return NULL; - } - return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error); -} - -EAPI void -evas_common_image_cache_free(void) -{ - evas_common_image_set_cache(0); -} - -EAPI Evas_Cache_Image* -evas_common_image_cache_get(void) -{ - return eci; -} - -EAPI RGBA_Image * -evas_common_image_line_buffer_obtain(int len) -{ - if (len < 1) return NULL; - if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN) - len = EVAS_RGBA_LINE_BUFFER_MIN_LEN; - return evas_common_image_create(len, 1); -/* - if (evas_rgba_line_buffer) - { - if (evas_rgba_line_buffer->image->w >= len) - return evas_rgba_line_buffer; - evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, len * sizeof(DATA32)); - if (!evas_rgba_line_buffer->image->data) - { - evas_common_image_free(evas_rgba_line_buffer); - evas_rgba_line_buffer = NULL; - return NULL; - } - evas_rgba_line_buffer->image->w = len; - return evas_rgba_line_buffer; - } - evas_rgba_line_buffer = evas_common_image_create(len, 1); - if (!evas_rgba_line_buffer) return NULL; - return evas_rgba_line_buffer; - */ -} - -EAPI void -evas_common_image_line_buffer_release(RGBA_Image *im) -{ - _evas_common_rgba_image_delete(&im->cache_entry); -/* - if (!evas_rgba_line_buffer) return; - if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w) - { - evas_rgba_line_buffer->image->w = EVAS_RGBA_LINE_BUFFER_MAX_LEN; - evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, - evas_rgba_line_buffer->image->w * sizeof(DATA32)); - if (!evas_rgba_line_buffer->image->data) - { - evas_common_image_free(evas_rgba_line_buffer); - evas_rgba_line_buffer = NULL; - } - } - */ -} - -EAPI void -evas_common_image_line_buffer_free(RGBA_Image *im) -{ - _evas_common_rgba_image_delete(&im->cache_entry); -/* - if (!evas_rgba_line_buffer) return; - evas_common_image_free(evas_rgba_line_buffer); - evas_rgba_line_buffer = NULL; - */ -} - -EAPI RGBA_Image * -evas_common_image_alpha_line_buffer_obtain(int len) -{ - if (len < 1) return NULL; - if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN) - len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN; - return evas_common_image_alpha_create(len, 1); -/* - if (evas_alpha_line_buffer) - { - if (evas_alpha_line_buffer->image->w >= len) - return evas_alpha_line_buffer; - evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, len * sizeof(DATA8)); - if (!evas_alpha_line_buffer->image->data) - { - evas_common_image_free(evas_alpha_line_buffer); - evas_alpha_line_buffer = NULL; - return NULL; - } - evas_alpha_line_buffer->image->w = len; - return evas_alpha_line_buffer; - } - evas_alpha_line_buffer = evas_common_image_alpha_create(len, 1); - return evas_alpha_line_buffer; - */ -} - -EAPI void -evas_common_image_alpha_line_buffer_release(RGBA_Image *im) -{ - _evas_common_rgba_image_delete(&im->cache_entry); -/* - if (!evas_alpha_line_buffer) return; - if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w) - { - evas_alpha_line_buffer->image->w = EVAS_ALPHA_LINE_BUFFER_MAX_LEN; - evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, - evas_alpha_line_buffer->image->w * sizeof(DATA8)); - if (!evas_alpha_line_buffer->image->data) - { - evas_common_image_free(evas_alpha_line_buffer); - evas_alpha_line_buffer = NULL; - } - } - */ -} - -EAPI void -evas_common_image_premul(Image_Entry *ie) -{ - DATA32 nas = 0; - - if (!ie) return ; - if (!evas_cache_image_pixels(ie)) return ; - if (!ie->flags.alpha) return; - - nas = evas_common_convert_argb_premul(evas_cache_image_pixels(ie), ie->w * ie->h); - if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) - ie->flags.alpha_sparse = 1; -} - -EAPI void -evas_common_image_set_alpha_sparse(Image_Entry *ie) -{ - DATA32 *s, *se; - DATA32 nas = 0; - - if (!ie) return; - if (!evas_cache_image_pixels(ie)) return ; - if (!ie->flags.alpha) return; - - s = evas_cache_image_pixels(ie); - se = s + (ie->w * ie->h); - while (s < se) - { - DATA32 p = *s & 0xff000000; - - if (!p || (p == 0xff000000)) - nas++; - s++; - } - if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) - ie->flags.alpha_sparse = 1; -} diff --git a/libraries/evas/src/lib/engines/common/evas_image_private.h b/libraries/evas/src/lib/engines/common/evas_image_private.h deleted file mode 100644 index 1bec6c8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_private.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _EVAS_IMAGE_PRIVATE_H -#define _EVAS_IMAGE_PRIVATE_H - -int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h); -int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace); - -void evas_common_scalecache_init(void); -void evas_common_scalecache_shutdown(void); -void evas_common_rgba_image_scalecache_init(Image_Entry *ie); -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 */ diff --git a/libraries/evas/src/lib/engines/common/evas_image_save.c b/libraries/evas/src/lib/engines/common/evas_image_save.c deleted file mode 100644 index d7484c0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_save.c +++ /dev/null @@ -1,51 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "evas_options.h" - -#include "evas_common.h" -#include "evas_private.h" - - -int -evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress) -{ - Evas_Image_Save_Func *evas_image_save_func = NULL; - char *p; - char *saver = NULL; - - p = strrchr(file, '.'); - if (p) - { - p++; - - if (!strcasecmp(p, "png")) - saver = "png"; - if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) || - (!strcasecmp(p, "jfif"))) - saver = "jpeg"; - if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) || - (!strcasecmp(p, "eap"))) - saver = "eet"; - if (!strcasecmp(p, "edb")) - saver = "edb"; - } - - if (saver) - { - Evas_Module *em; - - em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver); - if (em) - { - evas_module_use(em); - if (evas_module_load(em)) - { - evas_image_save_func = em->functions; - return evas_image_save_func->image_save(im, file, key, quality, compress); - } - } - } - return 0; -} diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c deleted file mode 100644 index e4e4790..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c +++ /dev/null @@ -1,844 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#ifdef HAVE_EVIL -# include -#endif - -#include - -#include "evas_common.h" -#include "evas_private.h" -#include "evas_image_private.h" - -#define SCALECACHE 1 - -#define MAX_SCALEITEMS 32 -#define MIN_SCALE_USES 3 -//#define MIN_SCALE_AGE_GAP 5000 -#define MAX_SCALECACHE_DIM 3200 -#define FLOP_ADD 4 -#define MAX_FLOP_COUNT 16 -#define FLOP_DEL 1 -#define SCALE_CACHE_SIZE 4 * 1024 * 1024 -//#define SCALE_CACHE_SIZE 0 - -typedef struct _Scaleitem Scaleitem; - -struct _Scaleitem -{ - EINA_INLIST; - unsigned long long usage; - unsigned long long usage_count; - RGBA_Image *im, *parent_im; - int src_x, src_y; - unsigned int src_w, src_h; - unsigned int dst_w, dst_h; - unsigned int flop; - unsigned int size_adjust; -#ifdef EVAS_FRAME_QUEUING - RWLK(lock); -#endif - Eina_Bool forced_unload : 1; - Eina_Bool smooth : 1; - Eina_Bool populate_me : 1; -}; - -#ifdef SCALECACHE -static unsigned long long use_counter = 0; - -static LK(cache_lock); -static Eina_Inlist *cache_list = NULL; -static unsigned int cache_size = 0; -static int init = 0; - -static unsigned int max_cache_size = SCALE_CACHE_SIZE; -static unsigned int max_dimension = MAX_SCALECACHE_DIM; -static unsigned int max_flop_count = MAX_FLOP_COUNT; -static unsigned int max_scale_items = MAX_SCALEITEMS; -static unsigned int min_scale_uses = MIN_SCALE_USES; -#endif - -void -evas_common_scalecache_init(void) -{ -#ifdef SCALECACHE - const char *s; - - init++; - if (init > 1) return; - use_counter = 0; - LKI(cache_lock); - s = getenv("EVAS_SCALECACHE_SIZE"); - if (s) max_cache_size = atoi(s) * 1024; - s = getenv("EVAS_SCALECACHE_MAX_DIMENSION"); - if (s) max_dimension = atoi(s); - s = getenv("EVAS_SCALECACHE_MAX_FLOP_COUNT"); - if (s) max_flop_count = atoi(s); - s = getenv("EVAS_SCALECACHE_MAX_ITEMS"); - if (s) max_scale_items = atoi(s); - s = getenv("EVAS_SCALECACHE_MIN_USES"); - if (s) min_scale_uses = atoi(s); -#endif -} - -void -evas_common_scalecache_shutdown(void) -{ -#ifdef SCALECACHE - init--; - if (init ==0) - LKD(cache_lock); -#endif -} - -void -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 -} - -void -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 -} - -void -evas_common_rgba_image_scalecache_dirty(Image_Entry *ie) -{ -#ifdef SCALECACHE - RGBA_Image *im = (RGBA_Image *)ie; - LKL(im->cache.lock); - while (im->cache.list) - { - Scaleitem *sci; - sci = im->cache.list->data; -#ifdef EVAS_FRAME_QUEUING - WRLKL(sci->lock); -#endif - im->cache.list = eina_list_remove(im->cache.list, sci); - if (sci->im) - { -// INF(" 0- %i", sci->dst_w * sci->dst_h * 4); - 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; - else - cache_size -= sci->size_adjust; - cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); - LKU(cache_lock); - } -#ifdef EVAS_FRAME_QUEUING - RWLKU(sci->lock); - RWLKD(sci->lock); -#endif - free(sci); - } - LKU(im->cache.lock); -#endif -} - -void -evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie) -{ -#ifdef SCALECACHE - RGBA_Image *im = (RGBA_Image *)ie; - LKL(im->cache.lock); - use_counter++; - // FIXME: if orig not loaded, reload - // FIXME: mark orig with current used counter - im->cache.orig_usage++; - im->cache.usage_count = use_counter; - LKU(im->cache.lock); -#endif -} - -int -evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie) -{ -#ifdef SCALECACHE - RGBA_Image *im = (RGBA_Image *)ie; - int size = 0; - Eina_List *l; - Scaleitem *sci; - LKL(im->cache.lock); - EINA_LIST_FOREACH(im->cache.list, l, sci) - { - if (sci->im) size += sci->dst_w * sci->dst_h * 4; - } - LKU(im->cache.lock); - return size; -#else - return 0; -#endif -} - -#ifdef SCALECACHE -static void -_sci_fix_newest(RGBA_Image *im) -{ - Eina_List *l; - Scaleitem *sci; - - im->cache.newest_usage = 0; - im->cache.newest_usage_count = 0; - EINA_LIST_FOREACH(im->cache.list, l, sci) - { - if (sci->usage > im->cache.newest_usage) - im->cache.newest_usage = sci->usage; - if (sci->usage_count > im->cache.newest_usage_count) - im->cache.newest_usage_count = sci->usage_count; - } -// INF("_sci_fix_newest! -> %i", im->cache.newest_usage); -} - -static Scaleitem * -_sci_find(RGBA_Image *im, - RGBA_Draw_Context *dc __UNUSED__, int smooth, - int src_region_x, int src_region_y, - unsigned int src_region_w, unsigned int src_region_h, - unsigned int dst_region_w, unsigned int dst_region_h) -{ - Eina_List *l; - Scaleitem *sci; - - EINA_LIST_FOREACH(im->cache.list, l, sci) - { - if ( - (sci->src_w == src_region_w) && - (sci->src_h == src_region_h) && - (sci->dst_w == dst_region_w) && - (sci->dst_h == dst_region_h) && - (sci->src_x == src_region_x) && - (sci->src_y == src_region_y) && - (sci->smooth == smooth) - ) - { - if (im->cache.list != l) - { - im->cache.list = eina_list_remove_list(im->cache.list, l); - im->cache.list = eina_list_prepend(im->cache.list, sci); - } - return sci; - } - } - if (eina_list_count(im->cache.list) > max_scale_items) - { - l = eina_list_last(im->cache.list); - sci = l->data; -#ifdef EVAS_FRAME_QUEUING - WRLKL(sci->lock); -#endif - im->cache.list = eina_list_remove_list(im->cache.list, l); - if ((sci->usage == im->cache.newest_usage) || - (sci->usage_count == im->cache.newest_usage_count)) - _sci_fix_newest(im); - if (sci->im) - { - evas_common_rgba_image_free(&sci->im->cache_entry); - if (!sci->forced_unload) - cache_size -= sci->dst_w * sci->dst_h * 4; - else - 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); - } -#ifdef EVAS_FRAME_QUEUING - RWLKU(sci->lock); -#endif - if (max_scale_items < 1) return NULL; - } - else - { - if (max_scale_items < 1) return NULL; - - if (eina_list_count(im->cache.list) > (max_scale_items - 1)) - return NULL; - sci = calloc(1, sizeof(Scaleitem)); - sci->parent_im = im; -#ifdef EVAS_FRAME_QUEUING - RWLKI(sci->lock); -#endif - } - sci->usage = 0; - sci->usage_count = 0; - sci->populate_me = 0; - sci->smooth = smooth; - sci->forced_unload = 0; - sci->flop = 0; - sci->im = NULL; - sci->src_x = src_region_x; - sci->src_y = src_region_y; - sci->src_w = src_region_w; - sci->src_h = src_region_h; - sci->dst_w = dst_region_w; - sci->dst_h = dst_region_h; - im->cache.list = eina_list_prepend(im->cache.list, sci); - return sci; -} - -static void -_cache_prune(Scaleitem *notsci, Eina_Bool copies_only) -{ - Scaleitem *sci; - while (cache_size > max_cache_size) - { - if (!cache_list) break; - sci = (Scaleitem *)(cache_list); - if (copies_only) - { - while ((sci) && (!sci->parent_im->image.data)) - sci = (Scaleitem *)(((Eina_Inlist *)sci)->next); - if (!sci) return; - } - if (sci == notsci) return; -#ifdef EVAS_FRAME_QUEUING - WRLKL(sci->lock); -#endif - if (sci->im) - { - evas_common_rgba_image_free(&sci->im->cache_entry); - sci->im = NULL; - sci->usage = 0; - sci->usage_count = 0; - sci->flop += FLOP_ADD; - if (!sci->forced_unload) - cache_size -= sci->dst_w * sci->dst_h * 4; - else - cache_size -= sci->size_adjust; -// INF(" 2- %i", sci->dst_w * sci->dst_h * 4); - cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); - memset(sci, 0, sizeof(Eina_Inlist)); - } -#ifdef EVAS_FRAME_QUEUING - RWLKU(sci->lock); -#endif - -// INF("FLUSH %i > %i", cache_size, max_cache_size); - } -} -#endif - -EAPI void -evas_common_rgba_image_scalecache_size_set(unsigned int size) -{ -#ifdef SCALECACHE - LKL(cache_lock); - if (size != max_cache_size) - { - max_cache_size = size; - _cache_prune(NULL, 1); - } - LKU(cache_lock); -#endif -} - -EAPI unsigned int -evas_common_rgba_image_scalecache_size_get(void) -{ -#ifdef SCALECACHE - int t; - LKL(cache_lock); - t = max_cache_size; - LKU(cache_lock); - return t; -#else - return 0; -#endif -} - -EAPI void -evas_common_rgba_image_scalecache_dump(void) -{ -#ifdef SCALECACHE - int t; - LKL(cache_lock); - t = max_cache_size; - max_cache_size = 0; - _cache_prune(NULL, 0); - max_cache_size = t; - LKU(cache_lock); -#endif -} - -EAPI void -evas_common_rgba_image_scalecache_flush(void) -{ -#ifdef SCALECACHE - int t; - LKL(cache_lock); - t = max_cache_size; - max_cache_size = 0; - _cache_prune(NULL, 1); - max_cache_size = t; - LKU(cache_lock); -#endif -} - -EAPI void -evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNUSED__, - 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 __UNUSED__, int dst_region_y __UNUSED__, - 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; - // 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; - if (locked) LKU(im->cache.lock); - return; - } - if ((!im->cache_entry.flags.alpha) && (!smooth)) - { - // solid nearest scaling - it's actually the same speed cached or not, - // or in some cases faster not cached - im->cache.orig_usage++; - im->cache.usage_count = use_counter; - if (locked) LKU(im->cache.lock); - return; - } - LKL(cache_lock); - sci = _sci_find(im, dc, smooth, - src_region_x, src_region_y, src_region_w, src_region_h, - dst_region_w, dst_region_h); - if (!sci) - { - LKU(cache_lock); - if (locked) LKU(im->cache.lock); - return; - } -// INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i", -// (int)use_counter, -// src_region_x, src_region_y, src_region_w, src_region_h, -// dst_region_x, dst_region_y, dst_region_w, dst_region_h, -// smooth); - if ((sci->usage >= min_scale_uses) - && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) -// && (sci->usage_count > (use_counter - MIN_SCALE_AGE_GAP)) - ) - { - if (!sci->im) - { - if ((sci->dst_w < max_dimension) && - (sci->dst_h < max_dimension)) - { - if (sci->flop <= max_flop_count) - { - sci->populate_me = 1; - im->cache.populate_count++; - } - } - } - } - sci->usage++; - sci->usage_count = use_counter; - LKU(cache_lock); - if (sci->usage > im->cache.newest_usage) - im->cache.newest_usage = sci->usage; -// INF("newset? %p %i > %i", im, -// (int)sci->usage, -// (int)im->cache.newest_usage); - 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); - if (locked) LKU(im->cache.lock); -#endif -} - -#ifdef SCALECACHE -//static int pops = 0; -//static int hits = 0; -//static int misses = 0; -//static int noscales = 0; -#endif - -EAPI void -evas_common_rgba_image_scalecache_do(Image_Entry *ie, 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) -{ -#ifdef SCALECACHE - RGBA_Image *im = (RGBA_Image *)ie; - Scaleitem *sci; - int didpop = 0; - int dounload = 0; -/* - static int i = 0; - - i++; - if (i > 2000) - { - INF("p: %6i, h: %6i, m: %6i, n: %6i", - pops, hits, misses, noscales); - i = 0; - } - */ - if ((dst_region_w == 0) || (dst_region_h == 0) || - (src_region_w == 0) || (src_region_h == 0)) return; - LKL(im->cache.lock); - if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) - { -#ifdef EVAS_FRAME_QUEUING - if (!evas_common_frameq_enabled()) -#endif - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - } -// noscales++; - LKU(im->cache.lock); - if (im->image.data) - { - 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; - } - LKL(cache_lock); - sci = _sci_find(im, dc, smooth, - src_region_x, src_region_y, src_region_w, src_region_h, - dst_region_w, dst_region_h); - LKU(cache_lock); - if (!sci) - { -#ifdef EVAS_FRAME_QUEUING - if (!evas_common_frameq_enabled()) -#endif - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - } -// misses++; - 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); - } - return; - } - if (sci->populate_me) - { - int size, osize, used; - - size = dst_region_w * dst_region_h; - if (((((dst_region_w > 640) || (dst_region_h > 640)) && - (size > (480 * 480))) || - (ie->scale_hint == EVAS_IMAGE_SCALE_HINT_STATIC)) && - (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)) - { - Eina_List *l; - Scaleitem *sci2; - - dounload = 1; - osize = sci->parent_im->cache_entry.w * sci->parent_im->cache_entry.h; - used = 0; - EINA_LIST_FOREACH(im->cache.list, l, sci2) - { - if (sci2->im) used += sci2->dst_w * sci2->dst_h; - } - if ((size < osize) && (used == 0)) - sci->size_adjust = 0; - else - { - osize -= used; - if (osize < 0) osize = 0; - size -= osize; - sci->size_adjust = size * 4; - } - } - else - { - size *= sizeof(DATA32); - if ((cache_size + size) > max_cache_size) - { - sci->populate_me = 0; - im->cache.populate_count--; - } - } - } - if (sci->populate_me) - { -// INF("##! populate!"); - sci->im = evas_common_image_new - (dst_region_w, dst_region_h, im->cache_entry.flags.alpha); - if (sci->im) - { - static RGBA_Draw_Context *ct = NULL; - - LKL(cache_lock); - im->cache.orig_usage++; - im->cache.usage_count = use_counter; - im->cache.populate_count--; -// pops++; - if (!ct) - { - // FIXME: static ct - never can free on shutdown? not a leak - // or real harm - just annoying valgrind bitch - ct = evas_common_draw_context_new(); - evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY); - } - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - if (im->image.data) - { - if (smooth) - evas_common_scale_rgba_in_to_out_clip_smooth - (im, sci->im, ct, - src_region_x, src_region_y, - src_region_w, src_region_h, - 0, 0, - dst_region_w, dst_region_h); - else - evas_common_scale_rgba_in_to_out_clip_sample - (im, sci->im, ct, - src_region_x, src_region_y, - src_region_w, src_region_h, - 0, 0, - dst_region_w, dst_region_h); - sci->populate_me = 0; -#if 0 // visual debug of cached images - { - int xx, yy; - DATA32 *pp; - - pp = sci->im->image.data; - for (yy = 0; yy < dst_region_h; yy++) - { - - for (xx = 0; xx < dst_region_w; xx++) - { - if (yy & 0x1) - { - if (xx & 0x1) *pp = 0x882288ff; - } - else - { - if (!(xx & 0x1)) *pp = 0x882288ff; - } - pp++; - } - } - } -#endif - } - if (dounload) - { - sci->forced_unload = 1; - cache_size += sci->size_adjust; - } - else - { - cache_size += sci->dst_w * sci->dst_h * 4; - } -// INF(" + %i @ flop: %i (%ix%i)", -// sci->dst_w * sci->dst_h * 4, sci->flop, -// sci->dst_w, sci->dst_h); - cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); - _cache_prune(sci, 0); - LKU(cache_lock); - didpop = 1; - } - } - if (sci->im && !ie->flags.animated) - { - if (!didpop) - { - LKL(cache_lock); - cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); - cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); - LKU(cache_lock); - } - else - { - if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL; - } -// INF("use cached!"); -#ifdef EVAS_FRAME_QUEUING - RDLKL(sci->lock); -#endif - LKU(im->cache.lock); - evas_common_scale_rgba_in_to_out_clip_sample - (sci->im, dst, dc, - 0, 0, - dst_region_w, dst_region_h, - dst_region_x, dst_region_y, - dst_region_w, dst_region_h); -#ifdef EVAS_FRAME_QUEUING - RWLKU(sci->lock); -#endif -// hits++; -// INF("check %p %i < %i", -// im, -// (int)im->cache.orig_usage, -// (int)im->cache.newest_usage); -#ifndef EVAS_FRAME_QUEUING - /* while framequeuing is applied, - * original image data is loaded by the main thread - * just before enqueuing the rendering op into the pipe. - * so unloading the original image data here - * causes only speed-down side-effect and no memory usage gain; - * it will be loaded again for the very next rendering for this image. - */ - if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) - { - if ((dounload) || - ((im->cache_entry.flags.loaded) && - ((!im->cs.no_free) -#ifdef EVAS_CSERVE - || (ie->data1) -#endif - ) && - (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888))) - { - if ((dounload) || (im->cache.orig_usage < - (im->cache.newest_usage / 20))) - { - //FIXME: imagedataunload - inform owners - evas_common_rgba_image_unload(&im->cache_entry); - } - } - } -#endif - } - else - { -#ifdef EVAS_FRAME_QUEUING - if (!evas_common_frameq_enabled()) -#endif - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - } -// misses++; - 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); - } - } -#else - RGBA_Image *im = (RGBA_Image *)ie; -#ifdef EVAS_FRAME_QUEUING - if (!evas_common_frameq_enabled()) -#endif - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - } - 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); - } -#endif -} diff --git a/libraries/evas/src/lib/engines/common/evas_line.h b/libraries/evas/src/lib/engines/common/evas_line.h deleted file mode 100644 index 9d45e3d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_line.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _EVAS_LINE_H -#define _EVAS_LINE_H - - -EAPI void evas_common_line_init (void); - -EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); - - -#endif /* _EVAS_LINE_H */ - diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c deleted file mode 100644 index aacf805..0000000 --- a/libraries/evas/src/lib/engines/common/evas_line_main.c +++ /dev/null @@ -1,1029 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - - -static void -_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y); - -static void -_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); - -static void -_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); - -static void -_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); - - -#define IN_RANGE(x, y, w, h) \ - ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) ) - -#define IN_RECT(x, y, rx, ry, rw, rh) \ - ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \ - ((unsigned)((y) - (ry)) < (unsigned)(rh)) ) - -#define EXCHANGE_POINTS(x0, y0, x1, y1) \ - { \ - int _tmp = y0; \ - \ - y0 = y1; \ - y1 = _tmp; \ - \ - _tmp = x0; \ - x0 = x1; \ - x1 = _tmp; \ - } - - -EAPI void -evas_common_line_init(void) -{ -} - -EAPI void -evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int x, y, w, h; - int clx, cly, clw, clh; - int cuse, cx, cy, cw, ch; - - if ((x0 == x1) && (y0 == y1)) - { - _evas_draw_point(dst, dc, x0, y0); - return; - } - - clx = cly = 0; - clw = dst->cache_entry.w; - clh = dst->cache_entry.h; - - /* save out clip info */ - cuse = dc->clip.use; - cx = dc->clip.x; - cy = dc->clip.y; - cw = dc->clip.w; - ch = dc->clip.h; - - if (cuse) - { - RECTS_CLIP_TO_RECT(clx, cly, clw, clh, cx, cy, cw, ch); - if ((clw < 1) || (clh < 1)) - return; - } - - x = MIN(x0, x1); - y = MIN(y0, y1); - w = MAX(x0, x1) - x + 1; - h = MAX(y0, y1) - y + 1; - - RECTS_CLIP_TO_RECT(clx, cly, clw, clh, x, y, w, h); - if ((clw < 1) || (clh < 1)) - return; - - dc->clip.use = 1; - dc->clip.x = clx; - dc->clip.y = cly; - dc->clip.w = clw; - dc->clip.h = clh; - - if (dc->anti_alias) - _evas_draw_line_aa(dst, dc, x0, y0, x1, y1); - else - _evas_draw_line(dst, dc, x0, y0, x1, y1); - - /* restore clip info */ - dc->clip.use = cuse; - dc->clip.x = cx; - dc->clip.y = cy; - dc->clip.w = cw; - dc->clip.h = ch; -} - - -static void -_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) -{ - RGBA_Gfx_Pt_Func pfunc; - - if (!IN_RANGE(x, y, dst->cache_entry.w, dst->cache_entry.h)) - return; - if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) - return; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_op_t op = PIXMAN_OP_SRC; - - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; - - if ((dst->pixman.im) && (dc->col.pixman_color_image)) - pixman_image_composite(op, dc->col.pixman_color_image, NULL, - dst->pixman.im, x, y, 0, 0, x, y, 1, 1); - else -# endif -#endif - { - pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); - if (pfunc) - pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); - } -} - -/* - these functions use the dc->clip data as bounding - data. they assume that such data has already been cut - back to lie in the dst image rect and the object's - (line) bounding rect. -*/ -static void -_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int dx, dy, len, lx, ty, rx, by; - int clx, cly, clw, clh; - int dstw; - DATA32 *p, color; - RGBA_Gfx_Pt_Func pfunc; - RGBA_Gfx_Func sfunc; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; -# endif -#endif - - dstw = dst->cache_entry.w; - color = dc->col.col; - - if (y0 > y1) - EXCHANGE_POINTS(x0, y0, x1, y1) - if (x0 > x1) - EXCHANGE_POINTS(x0, y0, x1, y1) - - dx = x1 - x0; - dy = y1 - y0; - - clx = dc->clip.x; - cly = dc->clip.y; - clw = dc->clip.w; - clh = dc->clip.h; - - lx = clx; - rx = clx + clw - 1; - ty = cly; - by = cly + clh - 1; - - if (dy == 0) - { -#ifdef EVAS_SLI - if (((y0) % dc->sli.h) == dc->sli.y) -#endif - { - if ((y0 >= ty) && (y0 <= by)) - { - if (dx < 0) - { - int tmp = x1; - - x1 = x0; - x0 = tmp; - } - - if (x0 < lx) x0 = lx; - if (x1 > rx) x1 = rx; - - len = x1 - x0 + 1; - p = dst->image.data + (dstw * y0) + x0; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - x0, y0, 0, 0, x0, y0, len, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - x0, y0, 0, 0, x0, y0, len, 1); - else -# endif -#endif - { - sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); - if (sfunc) - sfunc(NULL, NULL, color, p, len); - } - } - } - return; - } - - pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); - if (!pfunc) return; - - if (dx == 0) - { - if ((x0 >= lx) && (x0 <= rx)) - { - if (y0 < ty) y0 = ty; - if (y1 > by) y1 = by; - - len = y1 - y0 + 1; - p = dst->image.data + (dstw * y0) + x0; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - x0, y0, 0, 0, x0, y0, 1, len); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, dst->pixman.im, - x0, y0, 0, 0, x0, y0, 1, len); - else -# endif -#endif - { - while (len--) - { -#ifdef EVAS_SLI - if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) -#endif - { - pfunc(0, 255, color, p); - } - p += dstw; - } - } - } - return; - } - - if ((dy == dx) || (dy == -dx)) - { - int p0_in, p1_in; - - p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0); - p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0); - - if (dy > 0) - { - if (!p0_in) - { - x0 = x0 + (ty - y0); - y0 = ty; - if (x0 > rx) return; - if (x0 < lx) - { - y0 = y0 + (lx - x0); - x0 = lx; - if ((y0 < ty) || (y0 > by)) return; - } - } - if (!p1_in) - { - x1 = x0 + (by - y0); - y1 = by; - if (x1 < lx) return; - if (x1 > rx) - { - y1 = y0 + (rx - x0); - x1 = rx; - if ((y1 < ty) || (y1 > by)) return; - } - } - } - else - { - if (!p0_in) - { - x0 = x0 - (by - y0); - y0 = by; - if (x0 > rx) return; - if (x0 < lx) - { - y0 = y0 - (lx - x0); - x0 = lx; - if ((y0 < ty) || (y0 > by)) return; - } - } - if (!p1_in) - { - x1 = x0 - (ty - y0); - y1 = ty; - if (x1 < lx) return; - if (x1 > rx) - { - y1 = y0 - (rx - x0); - x1 = rx; - if ((y1 < ty) || (y1 > by)) return; - } - } - } - if (y1 > y0) - { - p = dst->image.data + (dstw * y0) + x0; - len = y1 - y0 + 1; - if (dx > 0) dstw++; - else dstw--; - } - else - { - len = y0 - y1 + 1; - p = dst->image.data + (dstw * y1) + x1; - if (dx > 0) dstw--; - else dstw++; - } -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - int pixman_x_position = x0; - int pixman_y_position = y0; - int x_unit = dstw - dst->cache_entry.w; -# endif -#endif - - - while (len--) - { -#ifdef EVAS_SLI - if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) -#endif - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - pixman_x_position, - pixman_y_position, - 0, 0, pixman_x_position, - pixman_y_position, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pixman_x_position, - pixman_y_position, 0, 0, - pixman_x_position, - pixman_y_position, 1, 1); - else -# endif -#endif - pfunc(0, 255, color, p); - } -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_x_position += x_unit; - pixman_y_position += 1; -# endif -#endif - p += dstw; - } - } -} - - -#define SETUP_LINE_SHALLOW \ - if (x0 > x1) \ - { \ - EXCHANGE_POINTS(x0, y0, x1, y1); \ - dx = -dx; \ - dy = -dy; \ - } \ - \ - px = x0; \ - py = y0; \ - \ - p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ - p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ - \ - dely = 1; \ - dh = dstw; \ - if (dy < 0) \ - { \ - dely = -1; \ - dh = -dstw; \ - } \ - \ - dyy = ((dy) << 16) / (dx); \ - \ - if (!p0_in) \ - { \ - dxx = ((dx) << 16) / (dy); \ - if (px < 0) \ - { \ - x = -px; px = 0; \ - yy = x * dyy; \ - y = yy >> 16; \ - if (!a_a) \ - y += (yy - (y << 16)) >> 15; \ - py += y; \ - if ((dely > 0) && (py >= clh)) \ - return; \ - else if ((dely < 0) && (py < -1)) \ - return; \ - } \ - \ - y = 0; \ - if ((dely > 0) && (py < 0)) \ - y = (-1 - py); \ - else if ((dely < 0) && (py >= clh)) \ - y = (clh - 1 - py); \ - \ - xx = y * dxx; \ - x = xx >> 16; \ - if (!a_a) \ - x += (xx - (x << 16)) >> 15; \ - px += x; \ - if (px >= clw) return; \ - \ - yy = x * dyy; \ - y = yy >> 16; \ - if (!a_a) \ - y += (yy - (y << 16)) >> 15; \ - py += y; \ - if ((dely > 0) && (py >= clh)) \ - return; \ - else if ((dely < 0) && (py < -1)) \ - return; \ - } \ - \ - p = data + (dstw * py) + px; \ - \ - x = px - x0; \ - yy = x * dyy; \ - prev_y = (yy >> 16); \ - \ - rx = MIN(x1 + 1, clw); \ - by = clh - 1; - - -#define SETUP_LINE_STEEP \ - if (y0 > y1) \ - { \ - EXCHANGE_POINTS(x0, y0, x1, y1); \ - dx = -dx; \ - dy = -dy; \ - } \ - \ - px = x0; \ - py = y0; \ - \ - p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ - p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ - \ - delx = 1; \ - if (dx < 0) \ - delx = -1; \ - \ - dxx = ((dx) << 16) / (dy); \ - \ - if (!p0_in) \ - { \ - dyy = ((dy) << 16) / (dx); \ - \ - if (py < 0) \ - { \ - y = -py; py = 0; \ - xx = y * dxx; \ - x = xx >> 16; \ - if (!a_a) \ - x += (xx - (x << 16)) >> 15; \ - px += x; \ - if ((delx > 0) && (px >= clw)) \ - return; \ - else if ((delx < 0) && (px < -1)) \ - return; \ - } \ - \ - x = 0; \ - if ((delx > 0) && (px < -1)) \ - x = (-1 - px); \ - else if ((delx < 0) && (px >= clw)) \ - x = (clw - 1 - px); \ - \ - yy = x * dyy; \ - y = yy >> 16; \ - if (!a_a) \ - y += (yy - (y << 16)) >> 15; \ - py += y; \ - if (py >= clh) return; \ - \ - xx = y * dxx; \ - x = xx >> 16; \ - if (!a_a) \ - x += (xx - (x << 16)) >> 15; \ - px += x; \ - if ((delx > 0) && (px >= clw)) \ - return; \ - else if ((delx < 0) && (px < -1)) \ - return; \ - } \ - \ - p = data + (dstw * py) + px; \ - \ - y = py - y0; \ - xx = y * dxx; \ - prev_x = (xx >> 16); \ - \ - by = MIN(y1 + 1, clh); \ - rx = clw - 1; - -static void -_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int px, py, x, y, prev_x, prev_y; - int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 0; - int delx, dely, xx, yy, dxx, dyy; - int clx, cly, clw, clh; - int dstw; - DATA32 *p, *data, color; - RGBA_Gfx_Pt_Func pfunc; - - dx = x1 - x0; - dy = y1 - y0; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - int pix_x; - int pix_y; - int pix_x_unit; - int pix_y_unit; - - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; - pix_x = x0; - pix_y = y0; - - if (dx < 0) - pix_x_unit = -1; - else - pix_x_unit = 1; - - if (dy < 0) - pix_y_unit = -1; - else - pix_y_unit = 1; -# endif -#endif - - if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) - { - _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); - return; - } - - color = dc->col.col; - pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); - if (!pfunc) return; - - clx = dc->clip.x; - cly = dc->clip.y; - clw = dc->clip.w; - clh = dc->clip.h; - - data = dst->image.data; - dstw = dst->cache_entry.w; - - data += (dstw * cly) + clx; - x0 -= clx; - y0 -= cly; - x1 -= clx; - y1 -= cly; - - /* shallow: x-parametric */ - if ((dy < dx) || (dy < -dx)) - { - SETUP_LINE_SHALLOW; - - while (px < rx) - { - y = (yy >> 16); - y += ((yy - (y << 16)) >> 15); - if (prev_y != y) - { - prev_y = y; - p += dh; - py += dely; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_y += pix_y_unit; -# endif -#endif - } - if (!p1_in) - { - if ((py < 0) && (dely < 0)) return; - if ((py > by) && (dely > 0)) return; - } - if (!p0_in) - { - if (py < 0) goto next_x; - } -#ifdef EVAS_SLI - if (((py) % dc->sli.h) == dc->sli.y) -#endif - { - if (IN_RANGE(px, py, clw, clh)) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else -# endif -#endif - pfunc(0, 255, color, p); - } - } -next_x: - yy += dyy; - px++; - p++; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_x += pix_x_unit; -# endif -#endif - } - return; - } - - /* steep: y-parametric */ - - SETUP_LINE_STEEP; - - while (py < by) - { - x = (xx >> 16); - x += ((xx - (x << 16)) >> 15); - if (prev_x != x) - { - prev_x = x; - px += delx; - p += delx; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_x += pix_x_unit; -# endif -#endif - } - if (!p1_in) - { - if ((px < 0) && (delx < 0)) return; - if ((px > rx) && (delx > 0)) return; - } - if (!p0_in) - { - if (px < 0) goto next_y; - } -#ifdef EVAS_SLI - if (((py) % dc->sli.h) == dc->sli.y) -#endif - { - if (IN_RANGE(px, py, clw, clh)) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else -# endif -#endif - pfunc(0, 255, color, p); - } - } -next_y: - xx += dxx; - py++; - p += dstw; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_y += pix_y_unit; -# endif -#endif - - } -} - - -static void -_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int px, py, x, y, prev_x, prev_y; - int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1; - int delx, dely, xx, yy, dxx, dyy; - int clx, cly, clw, clh; - int dstw; - DATA32 *p, *data, color; - RGBA_Gfx_Pt_Func pfunc; - - dx = x1 - x0; - dy = y1 - y0; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - int pix_x; - int pix_y; - int pix_x_unit; - int pix_y_unit; - - pixman_image_t *aa_mask_image; - int alpha_data_buffer; - - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; - pix_x = x0; - pix_y = y0; - - if (dx < 0) - pix_x_unit = -1; - else - pix_x_unit = 1; - - if (dy < 0) - pix_y_unit = -1; - else - pix_y_unit = 1; -# endif -#endif - if (y0 > y1) - EXCHANGE_POINTS(x0, y0, x1, y1); - - dx = x1 - x0; - dy = y1 - y0; - - if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy)) - { - _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); - return; - } - - color = dc->col.col; - pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op); - if (!pfunc) return; - - clx = dc->clip.x; - cly = dc->clip.y; - clw = dc->clip.w; - clh = dc->clip.h; - - data = evas_cache_image_pixels(&dst->cache_entry); - dstw = dst->cache_entry.w; - - data += (dstw * cly) + clx; - x0 -= clx; - y0 -= cly; - x1 -= clx; - y1 -= cly; - - /* shallow: x-parametric */ - if ((dy < dx) || (dy < -dx)) - { - SETUP_LINE_SHALLOW; - - while (px < rx) - { - DATA8 aa; - - y = (yy >> 16); - if (prev_y != y) - { - prev_y = y; - p += dh; - py += dely; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_y += pix_y_unit; -# endif -#endif - } - if (!p1_in) - { - if ((py < 0) && (dely < 0)) return; - if ((py > by) && (dely > 0)) return; - } - if (!p0_in) - { - if (py < 0) goto next_x; - } - if (px < clw) - { - aa = ((yy - (y << 16)) >> 8); - if ((py) < clh) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - alpha_data_buffer = 255 - aa; - aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, - (uint32_t *)&alpha_data_buffer, 4); - - if ((dst->pixman.im) && (dc->col.pixman_color_image ) && - (!dc->mask.mask)) - pixman_image_composite(PIXMAN_OP_OVER, - dc->col.pixman_color_image, - aa_mask_image, dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask) ) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else -# endif -#endif - pfunc(0, 255 - aa, color, p); -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_image_unref(aa_mask_image); -# endif -#endif - } - if ((py + 1) < clh) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - alpha_data_buffer = aa; - aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, - (uint32_t *)&alpha_data_buffer, 4); - - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(PIXMAN_OP_OVER, - dc->col.pixman_color_image, - aa_mask_image, dst->pixman.im, - pix_x, pix_y + 1, 0, 0, - pix_x, pix_y + 1, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x, pix_y + 1, 0, 0, - pix_x, pix_y + 1, 1, 1); - else -# endif -#endif - pfunc(0, aa, color, p + dstw); -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_image_unref(aa_mask_image); -# endif -#endif - } - } - -next_x: - yy += dyy; - px++; - p++; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_x += pix_x_unit; -# endif -#endif - } - return; - } - - /* steep: y-parametric */ - SETUP_LINE_STEEP; - - while (py < by) - { - DATA8 aa; - - x = (xx >> 16); - if (prev_x != x) - { - prev_x = x; - px += delx; - p += delx; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_x += pix_x_unit; -# endif -#endif - } - if (!p1_in) - { - if ((px < 0) && (delx < 0)) return; - if ((px > rx) && (delx > 0)) return; - } - if (!p0_in) - { - if (px < 0) goto next_y; - } - if (py < clh) - { - aa = ((xx - (x << 16)) >> 8); - if ((px) < clw) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - alpha_data_buffer = 255 - aa; - aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); - - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(PIXMAN_OP_OVER, - dc->col.pixman_color_image, - aa_mask_image, dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x, pix_y, 0, 0, - pix_x, pix_y, 1, 1); - else -# endif -#endif - pfunc(0, 255 - aa, color, p); -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_image_unref(aa_mask_image); -# endif -#endif - - } - if ((px + 1) < clw) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - alpha_data_buffer = aa; - aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, - (uint32_t *)&alpha_data_buffer, 4); - - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(PIXMAN_OP_OVER, - dc->col.pixman_color_image, - aa_mask_image, dst->pixman.im, - pix_x + 1, pix_y, 0, 0, - pix_x + 1, pix_y, 1, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - pix_x + 1, pix_y, 0, 0, - pix_x + 1, pix_y, 1, 1); - else -# endif -#endif - pfunc(0, aa, color, p + 1); -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pixman_image_unref(aa_mask_image); -# endif -#endif - } - } - next_y: - xx += dxx; - py++; - p += dstw; -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_LINE - pix_y += pix_y_unit; -# endif -#endif - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.c b/libraries/evas/src/lib/engines/common/evas_map_image.c deleted file mode 100644 index 502b2dc..0000000 --- a/libraries/evas/src/lib/engines/common/evas_map_image.c +++ /dev/null @@ -1,432 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - -#ifdef BUILD_SCALE_SMOOTH -# ifdef BUILD_MMX -# undef SCALE_USING_MMX -# define SCALE_USING_MMX -# endif -#endif - -#define FPI 8 -#define FPI1 (1 << (FPI)) -#define FPIH (1 << (FPI - 1)) - -#define FPFPI1 (1 << (FP + FPI)) - -typedef struct _Line Line; -typedef struct _Span Span; - -struct _Span -{ - int x1, x2; - FPc o1, o2, z1, z2; - FPc u[2], v[2]; - DATA32 col[2]; -}; - -struct _Line -{ - Span span[2]; -}; - -static FPc -_interp(int x1, int x2, int p, FPc u1, FPc u2) -{ - FPc u; - - x2 -= x1; - p -= x1; - u = u2 - u1; - u = (u * p) / (x2 + 1); - // FIXME: do z persp - return u1 + u; -} - -static DATA32 -_interp_col(int x1, int x2, int p, DATA32 col1, DATA32 col2) -{ - x2 -= x1; - p -= x1; - p = (p << 8) / (x2 + 1); - // FIXME: do z persp - return INTERP_256(p, col2, col1); -} - -static void -_limit(Span *s, int c1, int c2, int nocol) -{ - if (s->x1 < c1) - { - s->u[0] = _interp(s->x1, s->x2, c1, s->u[0], s->u[1]); - s->v[0] = _interp(s->x1, s->x2, c1, s->v[0], s->v[1]); - if (!nocol) - s->col[0] = _interp_col(s->x1, s->x2, c1, s->col[0], s->col[1]); - s->x1 = c1; - s->o1 = c1 << FP; - // FIXME: do s->z1 - } - if (s->x2 > c2) - { - s->u[1] = _interp(s->x1, s->x2, c2, s->u[0], s->u[1]); - s->v[1] = _interp(s->x1, s->x2, c2, s->v[0], s->v[1]); - if (!nocol) - s->col[1] = _interp_col(s->x1, s->x2, c2, s->col[0], s->col[1]); - s->x2 = c2; - s->o2 = c2 << FP; - // FIXME: do s->z2 - } -} - -// 12.63 % of time - this can improve -static void -_calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy __UNUSED__, int cw, int ch __UNUSED__) -{ - int i, y, yp, yy; - int py[4]; - int edge[4][4], edge_num, swapped, order[4]; - FPc uv[4][2], u, v, x, h, t, uu, vv; - DATA32 col[4]; - -#if 1 // maybe faster on x86? - for (i = 0; i < 4; i++) py[i] = p[i].y >> FP; -# define PY(x) (py[x]) -#else -# define PY(x) (p[x].y >> FP) -#endif - - if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3))) - { - int leftp, rightp; - int nocol = 1; - - leftp = rightp = 0; - for (i = 1; i < 4; i++) - { - if (p[i].x < p[leftp].x) leftp = i; - if (p[i].x > p[rightp].x) rightp = i; - if (p[i].col != 0xffffffff) nocol = 0; - } - for (y = ystart; y <= yend; y++) - { - yp = y - ystart; - if (y == PY(0)) - { - i = 0; - spans[yp].span[i].x1 = p[leftp].x >> FP; - spans[yp].span[i].o1 = p[leftp].x; - spans[yp].span[i].u[0] = p[leftp].u; - spans[yp].span[i].v[0] = p[leftp].v; - spans[yp].span[i].col[0] = p[leftp].col; - spans[yp].span[i].x2 = p[rightp].x >> FP; - spans[yp].span[i].o2 = p[rightp].x; - spans[yp].span[i].u[1] = p[rightp].u; - spans[yp].span[i].v[1] = p[rightp].v; - spans[yp].span[i].col[1] = p[rightp].col; - if ((spans[yp].span[i].x1 >= (cx + cw)) || - (spans[yp].span[i].x2 < cx)) - spans[yp].span[i].x1 = -1; - else - { - _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); - i++; - spans[yp].span[i].x1 = -1; - } - } - else - spans[yp].span[0].x1 = -1; - } - return; - } - for (y = ystart; y <= yend; y++) - { - int nocol = 1; - - yp = y - ystart; - edge_num = 0; - for (i = 0; i < 4; i++) - { - if ((PY(i) <= y) && (PY((i + 1) % 4) > y)) - { - edge[edge_num][0] = i; - edge[edge_num][1] = (i + 1) % 4; - edge_num++; - } - else if ((PY((i + 1) % 4) <= y) && (PY(i) > y)) - { - edge[edge_num][0] = (i + 1) % 4; - edge[edge_num][1] = i; - edge_num++; - } - if (p[i].col != 0xffffffff) nocol = 0; - } - // calculate line x points for each edge - for (i = 0; i < edge_num; i++) - { - int e1 = edge[i][0]; - int e2 = edge[i][1]; - FPc t256; - - h = (p[e2].y - p[e1].y) >> FP; // height of edge - if (h < 1) h = 1; - t = (((y << FP) + (FP1 / 2) - 1) - p[e1].y) >> FP; - x = p[e2].x - p[e1].x; - x = p[e1].x + ((x * t) / h); - -/* - // FIXME: 3d accuracy here - // XXX t needs adjusting. above its a linear interp point - // only. - // - // // FIXME: do in fixed pt. reduce divides - evas_common_cpu_end_opt(); - // - int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points - // - float focf, hf; - float z1, z2, y1, y2, dz, dy, zt, dydz, yt; - - focf = foc; - hf = h; - - // adjust for fixed point and focal length and z0 for map - z1 = (p[e1].z >> FP) - z0 + foc; - z2 = (p[e2].z >> FP) - z0 + foc; - // deltas - dz = z1 - z2; - - if (dz != 0) - { - int pt; - - // adjust for perspective point (being 0 0) - y1 = (p[e1].y >> FP) - py; - y2 = (p[e2].y >> FP) - py; - - // correct for x &y not being in world coords - screen coords - y1 = (y1 * z1) / focf; - y2 = (y2 * z2) / focf; - - // deltas - dy = y1 - y2; - - yt = y - py; - dydz = dy / dz; - - zt = (y2 - (dydz * z2)) / ((yt / focf) - dydz); - - pt = t; - t = ((z1 - zt) * hf) / dz; - } - */ - u = p[e2].u - p[e1].u; - uu = u >> FP; - if (uu < 0) uu = -uu; - if (uu == h) - { - yy = ((y << FP) - p[e1].y) >> FP; - if (u > 0) - u = p[e1].u + (yy << FP); - else - u = p[e1].u - (yy << FP) - (FP1 - 1); - } - else - { - if (u >= 0) - u = p[e1].u + ((u * t) / h); - else - u = p[e1].u + (((u * t) - (FP1 / 2)) / h); - } - - v = p[e2].v - p[e1].v; - vv = v >> FP; - if (vv < 0) vv = -vv; - if (vv == h) - { - yy = ((y << FP) - p[e1].y) >> FP; - if (v > 0) - v = p[e1].v + (yy << FP); - else - v = p[e1].v - (yy << FP) - (FP1 - 1); - } - else - { - if (v >= 0) - v = p[e1].v + ((v * t) / h); - else - v = p[e1].v + (((v * t) - (FP1 / 2)) / h); - } - - // FIXME: 3d accuracy for color too - t256 = (t << 8) / h; // maybe * 255? - col[i] = INTERP_256(t256, p[e2].col, p[e1].col); - - // FIXME: store z persp - uv[i][1] = v; - uv[i][0] = u; - edge[i][2] = x >> FP; - edge[i][3] = x; - // also fill in order - order[i] = i; - } - // sort edges from left to right - bubble. its a small list! - do - { - swapped = 0; - for (i = 0; i < (edge_num - 1); i++) - { - if (edge[order[i]][2] > edge[order[i + 1]][2]) - { - t = order[i]; - order[i] = order[i + 1]; - order[i + 1] = t; - swapped = 1; - } - } - } - while (swapped); - if (edge_num == 2) - { - i = 0; - spans[yp].span[i].x1 = edge[order[0]][2]; - spans[yp].span[i].o1 = edge[order[0]][3]; - spans[yp].span[i].u[0] = uv[order[0]][0]; - spans[yp].span[i].v[0] = uv[order[0]][1]; - spans[yp].span[i].col[0] = col[order[0]]; - - spans[yp].span[i].x2 = edge[order[1]][2]; - spans[yp].span[i].o2 = edge[order[1]][3]; - spans[yp].span[i].u[1] = uv[order[1]][0]; - spans[yp].span[i].v[1] = uv[order[1]][1]; - spans[yp].span[i].col[1] = col[order[1]]; - if ((spans[yp].span[i].x1 >= (cx + cw)) || - (spans[yp].span[i].x2 < cx)) - spans[yp].span[i].x1 = -1; - else - { - _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); - i++; - spans[yp].span[i].x1 = -1; - } - } - else if (edge_num == 4) - { - i = 0; - spans[yp].span[i].x1 = edge[order[0]][2]; - spans[yp].span[i].u[0] = uv[order[0]][0]; - spans[yp].span[i].v[0] = uv[order[0]][1]; - spans[yp].span[i].col[0] = col[order[0]]; - - spans[yp].span[i].x2 = edge[order[1]][2]; - spans[yp].span[i].u[1] = uv[order[1]][0]; - spans[yp].span[i].v[1] = uv[order[1]][1]; - spans[yp].span[i].col[1] = col[order[1]]; - if ((spans[yp].span[i].x1 >= (cx + cw)) || - (spans[yp].span[i].x2 < cx)) - spans[yp].span[i].x1 = -1; - else - { - _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); - i++; - } - spans[yp].span[i].x1 = edge[order[2]][2]; - spans[yp].span[i].u[0] = uv[order[2]][0]; - spans[yp].span[i].v[0] = uv[order[2]][1]; - spans[yp].span[i].col[0] = col[order[2]]; - - spans[yp].span[i].x2 = edge[order[3]][2]; - spans[yp].span[i].u[1] = uv[order[3]][0]; - spans[yp].span[i].v[1] = uv[order[3]][1]; - spans[yp].span[i].col[1] = col[order[3]]; - if ((spans[yp].span[i].x1 >= (cx + cw)) || - (spans[yp].span[i].x2 < cx)) - spans[yp].span[i].x1 = -1; - else - { - int l = cx; - - if (i > 0) l = spans[yp].span[i - 1].x2; - _limit(&(spans[yp].span[i]), l, cx + cw, nocol); - } - } - else - spans[yp].span[0].x1 = -1; - } -} - -#ifdef BUILD_SCALE_SMOOTH -# ifdef BUILD_MMX -# undef FUNC_NAME -# define FUNC_NAME evas_common_map_rgba_internal_mmx -# undef SCALE_USING_MMX -# define SCALE_USING_MMX -# include "evas_map_image_internal.c" -# endif -# ifdef BUILD_C -# undef FUNC_NAME -# define FUNC_NAME evas_common_map_rgba_internal -# undef SCALE_USING_MMX -# include "evas_map_image_internal.c" -# endif -#endif - -EAPI void -evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - int npoints __UNUSED__, RGBA_Map_Point *p, - int smooth, int level) -{ -#ifdef BUILD_MMX - int mmx, sse, sse2; -#endif - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch; - int i; - - if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&src->cache_entry); - evas_common_image_colorspace_normalize(src); - if (!src->image.data) return; -#ifdef BUILD_MMX - evas_common_cpu_can_do(&mmx, &sse, &sse2); -#endif - if ((!dc->cutout.rects) && (!dc->clip.use)) - { -#ifdef BUILD_MMX - if (mmx) - evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); - else -#endif -#ifdef BUILD_C - evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); -#endif - return; - } - /* save out clip info */ - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); -#ifdef BUILD_MMX - if (mmx) - evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); - else -#endif -#ifdef BUILD_C - evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); -#endif - } - evas_common_draw_context_apply_clear_cutouts(rects); - /* restore clip info */ - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; -} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image.h b/libraries/evas/src/lib/engines/common/evas_map_image.h deleted file mode 100644 index a7cb8cf..0000000 --- a/libraries/evas/src/lib/engines/common/evas_map_image.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _EVAS_MAP_H -#define _EVAS_MAP_H - -EAPI void -evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - int npoints, RGBA_Map_Point *points, - int smooth, int level); - -#endif /* _EVAS_MAP_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_core.c b/libraries/evas/src/lib/engines/common/evas_map_image_core.c deleted file mode 100644 index b9bbeb5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_map_image_core.c +++ /dev/null @@ -1,226 +0,0 @@ -//#undef SCALE_USING_MMX -{ - if (smooth) - { - for (y = ystart; y <= yend; y++) - { - int x, w, ww; - FPc u, v, ud, vd, dv, ue, ve; - DATA32 *d, *s; -#ifdef COLMUL - FPc cv, cd; // col -# ifdef SCALE_USING_MMX - FPc cc; -#endif - DATA32 c1, c2; // col -#endif - Line *line; - -#ifdef SCALE_USING_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) -#endif - - line = &(spans[y - ystart]); - for (i = 0; i < 2; i++) - { - Span *span; - - span = &(line->span[i]); - if (span->x1 >= 0) - { - long long tl; - - x = span->x1; - w = (span->x2 - x); - if (w <= 0) continue; - dv = (span->o2 - span->o1); - if (dv <= 0) continue; - - ww = w; - u = span->u[0] << FPI; - if (u < 0) u = 0; - else if (u > swp) u = swp; - v = span->v[0] << FPI; - if (v < 0) v = 0; - else if (v > shp) v = shp; - ue = span->u[1] << FPI; - if (ue < 0) ue = 0; - else if (ue > swp) ue = swp; - ve = span->v[1] << FPI; - if (ve < 0) ve = 0; - else if (ve > shp) ve = shp; - ud = (ue - u) / w; - vd = (ve - v) / w; - tl = (long long)ud * (w << FP); - tl = tl / dv; - ud = tl; - u -= (ud * (span->o1 - (span->x1 << FP))) / FP1; - - tl = (long long)vd * (w << FP); - tl = tl / dv; - vd = tl; - v -= (vd * (span->o1 - (span->x1 << FP))) / FP1; - - if (ud < 0) u += ud; - if (vd < 0) v += vd; - if (u < 0) u = 0; - else if (u >= swp) u = swp - 1; - if (v < 0) v = 0; - else if (v >= shp) v = shp - 1; - - if (direct) - d = dst->image.data + (y * dst->cache_entry.w) + x; - else - d = buf; - -#define SMOOTH 1 -#ifdef COLMUL - c1 = span->col[0]; // col - c2 = span->col[1]; // col - cv = 0; // col - cd = (255 << 16) / w; // col - - if (c1 == c2) - { - if (c1 == 0xffffffff) - { -#endif -#include "evas_map_image_loop.c" -#ifdef COLMUL - } - else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) - { - // all black line -# define COLBLACK 1 -# include "evas_map_image_loop.c" -# undef COLBLACK - } - else if (c1 == 0x000000) - { - // skip span - } - else - { - // generic loop -# include "evas_map_image_loop.c" - } - } - else - { -# include "evas_map_image_loop.c" - } -#endif - if (!direct) - { - d = dst->image.data; - d += (y * dst->cache_entry.w) + x; - func(buf, NULL, dc->mul.col, d, w); - } - } - else break; - } - } - } - else - { - for (y = ystart; y <= yend; y++) - { - int x, w, ww; - FPc u, v, ud, vd, ue, ve; - DATA32 *d, *s; -#ifdef COLMUL - FPc cv, cd; // col - DATA32 c1, c2; // col -#endif - Line *line; - - line = &(spans[y - ystart]); - for (i = 0; i < 2; i++) - { - Span *span; - - span = &(line->span[i]); - if (span->x1 >= 0) - { - x = span->x1; - w = (span->x2 - x); - - if (w <= 0) continue; - ww = w; - u = span->u[0] << FPI; - if (u < 0) u = 0; - else if (u > swp) u = swp; - v = span->v[0] << FPI; - if (v < 0) v = 0; - else if (v > shp) v = shp; - ue = span->u[1] << FPI; - if (ue < 0) ue = 0; - else if (ue > swp) ue = swp; - ve = span->v[1] << FPI; - if (ve < 0) ve = 0; - else if (ve > shp) ve = shp; - ud = (ue - u) / w; - vd = (ve - v) / w; - if (direct) - d = dst->image.data + (y * dst->cache_entry.w) + x; - else - d = buf; - - if (ud < 0) u += ud; - if (vd < 0) v += vd; - if (u < 0) u = 0; - else if (u >= swp) u = swp - 1; - if (v < 0) v = 0; - else if (v >= shp) v = shp - 1; - -#undef SMOOTH -#ifdef COLMUL - c1 = span->col[0]; // col - c2 = span->col[1]; // col - cv = 0; // col - cd = (255 << 16) / w; // col - - if (c1 == c2) - { - if (c1 == 0xffffffff) - { -#endif -#include "evas_map_image_loop.c" -#ifdef COLMUL - } - else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) - { - // all black line -# define COLBLACK 1 -# include "evas_map_image_loop.c" -# undef COLBLACK - } - else if (c1 == 0x000000) - { - // skip span - } - else - { - // generic loop -# include "evas_map_image_loop.c" - } - } - else - { - // generic loop -# include "evas_map_image_loop.c" - } -#endif - if (!direct) - { - d = dst->image.data; - d += (y * dst->cache_entry.w) + x; - func(buf, NULL, dc->mul.col, d, w); - } - } - else break; - } - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_internal.c b/libraries/evas/src/lib/engines/common/evas_map_image_internal.c deleted file mode 100644 index d60117e..0000000 --- a/libraries/evas/src/lib/engines/common/evas_map_image_internal.c +++ /dev/null @@ -1,117 +0,0 @@ -// 66.74 % of time -static void -FUNC_NAME(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - RGBA_Map_Point *p, - int smooth, int level __UNUSED__) // level unused for now - for future use -{ - int i; - int c, cx, cy, cw, ch; - int ytop, ybottom, ystart, yend, y, sw, shp, swp, direct; - Line *spans; - DATA32 *buf = NULL, *sp; - RGBA_Gfx_Func func = NULL; - int havea = 0; - int havecol = 4; - - // get the clip - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - if (!c) - { - cx = 0; - cy = 0; - cw = dst->cache_entry.w; - ch = dst->cache_entry.h; - } - - // find y yop line and y bottom line - ytop = p[0].y; - if ((p[0].col >> 24) < 0xff) havea = 1; - if (p[0].col == 0xffffffff) havecol--; - for (i = 1; i < 4; i++) - { - if (p[i].y < ytop) ytop = p[i].y; - if ((p[i].col >> 24) < 0xff) havea = 1; - if (p[i].col == 0xffffffff) havecol--; - } - - ybottom = p[0].y; - for (i = 1; i < 4; i++) - { - if (p[i].y > ybottom) ybottom = p[i].y; - } - - // convert to screen space from fixed point - ytop = ytop >> FP; - ybottom = ybottom >> FP; - - // if its outside the clip vertical bounds - don't bother - if ((ytop >= (cy + ch)) || (ybottom < cy)) return; - - // limit to the clip vertical bounds - if (ytop < cy) ystart = cy; - else ystart = ytop; - if (ybottom >= (cy + ch)) yend = (cy + ch) - 1; - else yend = ybottom; - - // get some source image information - sp = src->image.data; - sw = src->cache_entry.w; - swp = sw << (FP + FPI); - shp = src->cache_entry.h << (FP + FPI); - - // limit u,v coords of points to be within the source image - for (i = 0; i < 4; i++) - { - if (p[i].u < 0) p[i].u = 0; - else if (p[i].u > (int)(src->cache_entry.w << FP)) - p[i].u = src->cache_entry.w << FP; - - if (p[i].v < 0) p[i].v = 0; - else if (p[i].v > (int)(src->cache_entry.h << FP)) - p[i].v = src->cache_entry.h << FP; - } - - // allocate some spans to hold out span list - spans = alloca((yend - ystart + 1) * sizeof(Line)); - if (!spans) return; - memset(spans, 0, (yend - ystart + 1) * sizeof(Line)); - - // calculate the spans list - _calc_spans(p, spans, ystart, yend, cx, cy, cw, ch); - - // walk through spans and render - - // if operation is solid, bypass buf and draw func and draw direct to dst - direct = 0; - if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && - (!dc->mul.use) && (!havea)) - { - direct = 1; - } - else - { - int pa; - - buf = alloca(cw * sizeof(DATA32)); - if (!buf) return; - pa = src->cache_entry.flags.alpha; - if (havea) src->cache_entry.flags.alpha = 1; - if (dc->mul.use) - func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op); - else - func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op); - src->cache_entry.flags.alpha = pa; - } - - if (!havecol) - { -#undef COLMUL -#include "evas_map_image_core.c" - } - else - { -#define COLMUL 1 -#include "evas_map_image_core.c" - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_map_image_loop.c b/libraries/evas/src/lib/engines/common/evas_map_image_loop.c deleted file mode 100644 index c434386..0000000 --- a/libraries/evas/src/lib/engines/common/evas_map_image_loop.c +++ /dev/null @@ -1,116 +0,0 @@ -#ifdef SMOOTH -{ - while (ww > 0) - { -# ifdef COLBLACK - *d = 0xff000000; // col -# else - FPc u1, v1, u2, v2; - FPc rv, ru; - DATA32 val1, val2, val3, val4; - - u1 = u; - if (u1 < 0) u1 = 0; - else if (u1 >= swp) u1 = swp - 1; - - v1 = v; - if (v1 < 0) v1 = 0; - else if (v1 >= shp) v1 = shp - 1; - - u2 = u1 + FPFPI1; - if (u2 >= swp) u2 = swp - 1; - - v2 = v1 + FPFPI1; - if (v2 >= shp) v2 = shp - 1; - - ru = (u >> (FP + FPI - 8)) & 0xff; - rv = (v >> (FP + FPI - 8)) & 0xff; - - s = sp + ((v1 >> (FP + FPI)) * sw) + - (u1 >> (FP + FPI)); - val1 = *s; - s = sp + ((v1 >> (FP + FPI)) * sw) + - (u2 >> (FP + FPI)); - val2 = *s; - - s = sp + ((v2 >> (FP + FPI)) * sw) + - (u1 >> (FP + FPI)); - val3 = *s; - s = sp + ((v2 >> (FP + FPI)) * sw) + - (u2 >> (FP + FPI)); - val4 = *s; -# ifdef SCALE_USING_MMX - MOV_A2R(rv, mm4); - MOV_A2R(ru, mm6); - MOV_P2R(val1, mm1, mm0); - if (val1 | val2) - { - MOV_P2R(val2, mm2, mm0); - INTERP_256_R2R(mm6, mm2, mm1, mm5); - } - MOV_P2R(val3, mm2, mm0); - if (val3 | val4) - { - MOV_P2R(val4, mm3, mm0); - INTERP_256_R2R(mm6, mm3, mm2, mm5); - } - INTERP_256_R2R(mm4, mm2, mm1, mm5); -# ifdef COLMUL - cc = cv >> 16; // col - cv += cd; // col - MOV_A2R(cc, mm2); // col - MOV_P2R(c1, mm3, mm0); // col - MOV_P2R(c2, mm4, mm0); // col - INTERP_256_R2R(mm2, mm4, mm3, mm5); // col - MUL4_SYM_R2R(mm3, mm1, mm5); // col -# endif - MOV_R2P(mm1, *d, mm0); -# else - val1 = INTERP_256(ru, val2, val1); - val3 = INTERP_256(ru, val4, val3); - val1 = INTERP_256(rv, val3, val1); // col -# ifdef COLMUL - val2 = INTERP_256((cv >> 16), c2, c1); // col - *d = MUL4_SYM(val2, val1); // col - cv += cd; // col -# else - *d = INTERP_256(rv, val3, val1); -# endif -# endif - u += ud; - v += vd; -# endif - d++; - ww--; - } -} -#else -{ - while (ww > 0) - { -# ifdef COLMUL -# ifndef COLBLACK - DATA32 val1, cval; // col -# endif -# endif -# ifdef COLBLACK - *d = 0xff000000; // col -# else - s = sp + ((v >> (FP + FPI)) * sw) + - (u >> (FP + FPI)); -# ifdef COLMUL - val1 = *s; // col - cval = INTERP_256((cv >> 16), c2, c1); // col - *d = MUL4_SYM(cval, val1); - cv += cd; // col -# else - *d = *s; -# endif - u += ud; - v += vd; -# endif - d++; - ww--; - } -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am deleted file mode 100644 index 78ce9fa..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_add_color_.c \ -op_add_color_i386.c \ -op_add_mask_color_.c \ -op_add_mask_color_i386.c \ -op_add_pixel_.c \ -op_add_pixel_color_.c \ -op_add_pixel_color_i386.c \ -op_add_pixel_i386.c \ -op_add_pixel_mask_.c \ -op_add_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in deleted file mode 100644 index 61d3479..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_add -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_add_color_.c \ -op_add_color_i386.c \ -op_add_mask_color_.c \ -op_add_mask_color_i386.c \ -op_add_pixel_.c \ -op_add_pixel_color_.c \ -op_add_pixel_color_i386.c \ -op_add_pixel_i386.c \ -op_add_pixel_mask_.c \ -op_add_pixel_mask_i386.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c deleted file mode 100644 index ace781b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add color -> dst */ - -#ifdef BUILD_C -static void -init_add_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* add_rel color -> dst */ - -#ifdef BUILD_C -static void -init_add_rel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_rel_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c deleted file mode 100644 index f4f83a4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add color -> dst */ - -#ifdef BUILD_MMX -static void -init_add_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_color_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* add_rel color -> dst */ - -#ifdef BUILD_MMX -static void -init_add_rel_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_rel_color_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c deleted file mode 100644 index b20053c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add mask x color -> dst */ - -#ifdef BUILD_C -static void -init_add_mask_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_mask_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* add_rel mask x color -> dst */ - -#ifdef BUILD_C -static void -init_add_rel_mask_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_rel_mask_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c deleted file mode 100644 index 6a86f86..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add mask x color -> dst */ - -#ifdef BUILD_MMX -static void -init_add_mask_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_mask_color_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* add_rel mask x color -> dst */ - -#ifdef BUILD_MMX -static void -init_add_rel_mask_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_rel_mask_color_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c deleted file mode 100644 index 4fe5a76..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add pixel --> dst */ - -#ifdef BUILD_C -static void -init_add_pixel_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_pixel_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* add_rel pixel --> dst */ - -#ifdef BUILD_C -static void -init_add_rel_pixel_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_rel_pixel_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c deleted file mode 100644 index aa0dba1..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add pixel x color --> dst */ - -#ifdef BUILD_C -static void -init_add_pixel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_pixel_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* add_rel pixel x color --> dst */ - -#ifdef BUILD_C -static void -init_add_rel_pixel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_rel_pixel_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c deleted file mode 100644 index fa382d9..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c +++ /dev/null @@ -1,29 +0,0 @@ -/* add pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -init_add_pixel_color_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_add_pixel_color_pt_funcs_mmx(void) -{ } -#endif - -/*-----*/ - -/* add_rel pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_color_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_color_pt_funcs_mmx(void) -{ } -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c deleted file mode 100644 index eb2b5a3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add pixel --> dst */ - -#ifdef BUILD_MMX -static void -init_add_pixel_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_pixel_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* add_rel pixel --> dst */ - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c deleted file mode 100644 index 8414bce..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c +++ /dev/null @@ -1,37 +0,0 @@ -/* add pixel x mask --> dst */ - -#ifdef BUILD_C -/* XXX: not used -static void -init_add_pixel_mask_span_funcs_c(void) -{ -} -*/ -#endif - -#ifdef BUILD_C -/* XXX: not used -static void -init_add_pixel_mask_pt_funcs_c(void) -{ -} -*/ -#endif - -/*-----*/ - -/* add_rel pixel x mask --> dst */ - -#ifdef BUILD_C -static void -init_add_rel_pixel_mask_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_add_rel_pixel_mask_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c deleted file mode 100644 index a6309c3..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* add pixel x mask -> dst */ - -#ifdef BUILD_MMX -static void -init_add_pixel_mask_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_pixel_mask_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* add_rel pixel x mask -> dst */ - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_mask_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_add_rel_pixel_mask_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c deleted file mode 100644 index ef8b728..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c +++ /dev/null @@ -1,541 +0,0 @@ -#include "evas_common.h" -static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_add_init(void); -static void op_add_shutdown(void); - -static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_add = { "add", - op_add_init, op_add_shutdown, - op_add_pixel_span_get, op_add_color_span_get, - op_add_pixel_color_span_get, op_add_mask_color_span_get, - op_add_pixel_mask_span_get, - op_add_pixel_pt_get, op_add_color_pt_get, - op_add_pixel_color_pt_get, op_add_mask_color_pt_get, - op_add_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_add_get(void) -{ - return &(_composite_add); -} - -static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_add_rel_init(void); -static void op_add_rel_shutdown(void); - -static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel", - op_add_rel_init, op_add_rel_shutdown, - op_add_rel_pixel_span_get, op_add_rel_color_span_get, - op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get, - op_add_rel_pixel_mask_span_get, - op_add_rel_pixel_pt_get, op_add_rel_color_pt_get, - op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get, - op_add_rel_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_add_rel_get(void) -{ - return &(_composite_add_rel); -} - - -# include "./evas_op_add/op_add_pixel_.c" -# include "./evas_op_add/op_add_color_.c" -# include "./evas_op_add/op_add_pixel_color_.c" -# include "./evas_op_add/op_add_pixel_mask_.c" -# include "./evas_op_add/op_add_mask_color_.c" -//# include "./evas_op_add/op_add_pixel_mask_color_.c" - -# include "./evas_op_add/op_add_pixel_i386.c" -# include "./evas_op_add/op_add_color_i386.c" -# include "./evas_op_add/op_add_pixel_color_i386.c" -# include "./evas_op_add/op_add_pixel_mask_i386.c" -# include "./evas_op_add/op_add_mask_color_i386.c" -//# include "op_add_pixel_mask_color_.c" - -static void -op_add_init(void) -{ - memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs)); - memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs)); -#ifdef BUILD_MMX - init_add_pixel_span_funcs_mmx(); - init_add_pixel_color_span_funcs_mmx(); - init_add_pixel_mask_span_funcs_mmx(); - init_add_color_span_funcs_mmx(); - init_add_mask_color_span_funcs_mmx(); - - init_add_pixel_pt_funcs_mmx(); - init_add_pixel_color_pt_funcs_mmx(); - init_add_pixel_mask_pt_funcs_mmx(); - init_add_color_pt_funcs_mmx(); - init_add_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_add_pixel_span_funcs_c(); - init_add_pixel_color_span_funcs_c(); - init_add_rel_pixel_mask_span_funcs_c(); - init_add_color_span_funcs_c(); - init_add_mask_color_span_funcs_c(); - - init_add_pixel_pt_funcs_c(); - init_add_pixel_color_pt_funcs_c(); - init_add_rel_pixel_mask_pt_funcs_c(); - init_add_color_pt_funcs_c(); - init_add_mask_color_pt_funcs_c(); -#endif -} - -static void -op_add_shutdown(void) -{ -} - -static RGBA_Gfx_Func -add_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_add_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_add_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -add_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_add_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_add_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_gfx_pt_func_cpu(s, m, c, d); -} - - - -static void -op_add_rel_init(void) -{ - memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs)); - memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs)); -#ifdef BUILD_MMX - init_add_rel_pixel_span_funcs_mmx(); - init_add_rel_pixel_color_span_funcs_mmx(); - init_add_rel_pixel_mask_span_funcs_mmx(); - init_add_rel_color_span_funcs_mmx(); - init_add_rel_mask_color_span_funcs_mmx(); - - init_add_rel_pixel_pt_funcs_mmx(); - init_add_rel_pixel_color_pt_funcs_mmx(); - init_add_rel_pixel_mask_pt_funcs_mmx(); - init_add_rel_color_pt_funcs_mmx(); - init_add_rel_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_add_rel_pixel_span_funcs_c(); - init_add_rel_pixel_color_span_funcs_c(); - init_add_rel_pixel_mask_span_funcs_c(); - init_add_rel_color_span_funcs_c(); - init_add_rel_mask_color_span_funcs_c(); - - init_add_rel_pixel_pt_funcs_c(); - init_add_rel_pixel_color_pt_funcs_c(); - init_add_rel_pixel_mask_pt_funcs_c(); - init_add_rel_color_pt_funcs_c(); - init_add_rel_mask_color_pt_funcs_c(); -#endif -} - -static void -op_add_rel_shutdown(void) -{ -} - -static RGBA_Gfx_Func -add_rel_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_add_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_add_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -add_rel_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_add_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_add_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return add_rel_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am deleted file mode 100644 index 77435c4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_blend_color_.c \ -op_blend_color_i386.c \ -op_blend_color_neon.c \ -op_blend_color_sse3.c \ -op_blend_mask_color_.c \ -op_blend_mask_color_i386.c \ -op_blend_mask_color_neon.c \ -op_blend_mask_color_sse3.c \ -op_blend_pixel_.c \ -op_blend_pixel_color_.c \ -op_blend_pixel_color_i386.c \ -op_blend_pixel_color_neon.c \ -op_blend_pixel_color_sse3.c \ -op_blend_pixel_i386.c \ -op_blend_pixel_mask_.c \ -op_blend_pixel_mask_i386.c \ -op_blend_pixel_mask_neon.c \ -op_blend_pixel_mask_sse3.c \ -op_blend_pixel_neon.c \ -op_blend_pixel_sse3.c - -noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la - -libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ -op_blend_master_sse3.c - -libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/engines/common \ --I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ --I$(top_srcdir)/src/lib/cserve \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@EET_CFLAGS@ @pthread_cflags@ \ -@EINA_CFLAGS@ \ -@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@EVAS_SSE3_CFLAGS@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in deleted file mode 100644 index 016b49c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in +++ /dev/null @@ -1,721 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_blend -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_engine_common_op_blend_master_sse3_la_LIBADD = -am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS = libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo -libevas_engine_common_op_blend_master_sse3_la_OBJECTS = \ - $(am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libevas_engine_common_op_blend_master_sse3_la_LINK = $(LIBTOOL) \ - $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) \ - $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) -DIST_SOURCES = \ - $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_blend_color_.c \ -op_blend_color_i386.c \ -op_blend_color_neon.c \ -op_blend_color_sse3.c \ -op_blend_mask_color_.c \ -op_blend_mask_color_i386.c \ -op_blend_mask_color_neon.c \ -op_blend_mask_color_sse3.c \ -op_blend_pixel_.c \ -op_blend_pixel_color_.c \ -op_blend_pixel_color_i386.c \ -op_blend_pixel_color_neon.c \ -op_blend_pixel_color_sse3.c \ -op_blend_pixel_i386.c \ -op_blend_pixel_mask_.c \ -op_blend_pixel_mask_i386.c \ -op_blend_pixel_mask_neon.c \ -op_blend_pixel_mask_sse3.c \ -op_blend_pixel_neon.c \ -op_blend_pixel_sse3.c - -noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la -libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ -op_blend_master_sse3.c - -libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/engines/common \ --I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ --I$(top_srcdir)/src/lib/cserve \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@EET_CFLAGS@ @pthread_cflags@ \ -@EINA_CFLAGS@ \ -@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@EVAS_SSE3_CFLAGS@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_engine_common_op_blend_master_sse3.la: $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_DEPENDENCIES) - $(AM_V_CCLD)$(libevas_engine_common_op_blend_master_sse3_la_LINK) $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo: op_blend_master_sse3.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -MT libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo -MD -MP -MF $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='op_blend_master_sse3.c' object='libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c deleted file mode 100644 index be70065..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c +++ /dev/null @@ -1,109 +0,0 @@ -/* blend color -> dst */ - -#ifdef BUILD_C -static void -_op_blend_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e, a = 256 - (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = c + MUL_256(a, *d); - d++; - }); -} - -#define _op_blend_caa_dp _op_blend_c_dp - -#define _op_blend_c_dpan _op_blend_c_dp -#define _op_blend_caa_dpan _op_blend_c_dpan - -static void -init_blend_color_span_funcs_c(void) -{ - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_c_dp; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_caa_dp; - - op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_c_dpan; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = 256 - (c >> 24); - *d = c + MUL_256(s, *d); -} - -#define _op_blend_pt_caa_dp _op_blend_pt_c_dp - -#define _op_blend_pt_c_dpan _op_blend_pt_c_dp -#define _op_blend_pt_caa_dpan _op_blend_pt_c_dpan - -#define _op_blend_pt_c_dpas _op_blend_pt_c_dp -#define _op_blend_pt_caa_dpas _op_blend_pt_c_dp - -static void -init_blend_color_pt_funcs_c(void) -{ - op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_pt_c_dp; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_caa_dp; - - op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_c_dpan; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_caa_dpan; -} -#endif - -/*-----*/ - -/* blend_rel color -> dst */ - -#ifdef BUILD_C -static void -_op_blend_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha = 256 - (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); - d++; - }); -} - -#define _op_blend_rel_caa_dp _op_blend_rel_c_dp - -#define _op_blend_rel_c_dpan _op_blend_c_dpan -#define _op_blend_rel_caa_dpan _op_blend_caa_dpan - -static void -init_blend_rel_color_span_funcs_c(void) -{ - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_c_dp; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_caa_dp; - - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_c_dpan; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = *d >> 24; - *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); -} - -#define _op_blend_rel_pt_caa_dp _op_blend_rel_pt_c_dp - -#define _op_blend_rel_pt_c_dpan _op_blend_pt_c_dpan -#define _op_blend_rel_pt_caa_dpan _op_blend_pt_caa_dpan - -static void -init_blend_rel_color_pt_funcs_c(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_c_dp; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_caa_dp; - - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_c_dpan; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c deleted file mode 100644 index a05af7d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c +++ /dev/null @@ -1,138 +0,0 @@ -/* blend color --> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - c = 256 - (c >> 24); - MOV_A2R(c, mm3) - while (d < e) { - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - d++; - } -} - -#define _op_blend_caa_dp_mmx _op_blend_c_dp_mmx - -#define _op_blend_c_dpan_mmx _op_blend_c_dp_mmx -#define _op_blend_caa_dpan_mmx _op_blend_c_dpan_mmx - -static void -init_blend_color_span_funcs_mmx(void) -{ - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_c_dp_mmx; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_caa_dp_mmx; - - op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_c_dpan_mmx; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - c = 256 - (c >> 24); - MOV_A2R(c, mm3) - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_pt_caa_dp_mmx _op_blend_pt_c_dp_mmx - -#define _op_blend_pt_c_dpan_mmx _op_blend_pt_c_dp_mmx -#define _op_blend_pt_caa_dpan_mmx _op_blend_pt_c_dpan_mmx - -static void -init_blend_color_pt_funcs_mmx(void) -{ - op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_c_dp_mmx; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_caa_dp_mmx; - - op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_c_dpan_mmx; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_caa_dpan_mmx; -} -#endif -/*-----*/ - -/* blend_rel color -> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - c = 256 - (c >> 24); - MOV_A2R(c, mm3) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm3, mm1) - MUL4_SYM_R2R(mm2, mm4, mm5) - paddw_r2r(mm4, mm1); - MOV_R2P(mm1, *d, mm0) - d++; - } -} - -#define _op_blend_rel_caa_dp_mmx _op_blend_rel_c_dp_mmx - -#define _op_blend_rel_c_dpan_mmx _op_blend_c_dpan_mmx -#define _op_blend_rel_caa_dpan_mmx _op_blend_caa_dpan_mmx - -static void -init_blend_rel_color_span_funcs_mmx(void) -{ - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_c_dp_mmx; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_caa_dp_mmx; - - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_c_dpan_mmx; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_rel_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - - MOV_P2R(c, mm2, mm0) - MOV_RA2R(mm2, mm1) - psubw_r2r(mm1, mm6); - - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm6, mm1) - - MUL4_SYM_R2R(mm4, mm2, mm5) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_rel_pt_caa_dp_mmx _op_blend_rel_pt_c_dp_mmx - -#define _op_blend_rel_pt_c_dpan_mmx _op_blend_pt_c_dpan_mmx -#define _op_blend_rel_pt_caa_dpan_mmx _op_blend_pt_caa_dpan_mmx - -static void -init_blend_rel_color_pt_funcs_mmx(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_pt_c_dp_mmx; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_caa_dp_mmx; - - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_c_dpan_mmx; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c deleted file mode 100644 index 53b9991..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c +++ /dev/null @@ -1,223 +0,0 @@ -/* blend color --> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e, *tmp = 0; -#define AP "B_C_DP" - asm volatile ( - ".fpu neon \n\t" - "vdup.u32 q6, %[c] \n\t" - "vmov.i8 q5, #1 \n\t" - "vmvn.u8 q7,q6 \n\t" - "vshr.u32 q7, q7, $0x18 \n\t" - "vmul.u32 q7,q5, q7 \n\t" - "bic %[e], #3 \n\t" - "bic %[d], #3 \n\t" - - AP "loopchoose: \n\t" - // If aligned already - straight to quads - "andS %[tmp], %[d],$0x1f \n\t" - "beq "AP"quadloops \n\t" - - "andS %[tmp], %[d],$0x4 \n\t" - "beq "AP"dualloop \n\t" - - // Only ever executes once, fall through to dual - AP "singleloop: \n\t" - // Use 'tmp' not 'd' - "vld1.32 d0[0], [%[d]] \n\t" - // Only touch d1 - "vmull.u8 q0, d0, d14 \n\t" - "vqrshrn.u16 d0, q0, #8 \n\t" - "vadd.u8 d0, d12, d0 \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - - "add %[d], #4 \n\t" - - // Can we go the fast path? - "andS %[tmp], %[d],$0x1f \n\t" - "beq "AP"quadloops \n\t" - - AP "dualloop: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - - AP "dualloopint: \n\t" - "vldr.32 d0, [%[d]] \n\t" - "vmull.u8 q1, d0, d14 \n\t" - "vqrshrn.u16 d0, q1, #8 \n\t" - "vqadd.u8 d0, d0, d12 \n\t" - - "vstm %[d]!, {d0} \n\t" - - "ands %[tmp], %[d], $0x1f \n\t" - "bne "AP"dualloopint \n\t" - - AP "quadloops: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp],%[e],#31 \n\t" - - AP "quadloopint:\n\t" - "vldm %[d], {d0,d1,d2,d3} \n\t" - - "vmull.u8 q2, d0, d14 \n\t" - "vmull.u8 q3, d1, d15 \n\t" - "vmull.u8 q4, d2, d14 \n\t" - "vmull.u8 q5, d3, d15 \n\t" - - "vqrshrn.u16 d0, q2, #8 \n\t" - "vqrshrn.u16 d1, q3, #8 \n\t" - "vqrshrn.u16 d2, q4, #8 \n\t" - "vqrshrn.u16 d3, q5, #8 \n\t" - - "vqadd.u8 q0, q6, q0 \n\t" - "vqadd.u8 q1, q6, q1 \n\t" - - "vstm %[d]!, {d0,d1,d2,d3} \n\t" - - "cmp %[tmp], %[d]\n\t" - "bhi "AP"quadloopint\n\t" - - AP "loopout: \n\t" - "cmp %[d], %[e]\n\t" - "beq "AP"done\n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],#8 \n\t" - "blt "AP"singleloop2 \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],$0x7 \n\t" - AP "dualloop2int: \n\t" - "vldr.64 d0, [%[d]] \n\t" - "vmull.u8 q1, d0, d14 \n\t" - "vqrshrn.u16 d0, q1, #8 \n\t" - "vqadd.u8 d0, d0, d12 \n\t" - - "vstr.64 d0, [%[d]] \n\t" - - "add %[d], #8 \n\t" - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2int \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP "singleloop2: \n\t" - "vld1.32 d0[0], [%[d]] \n\t" - "vmull.u8 q1, d0, d14 \n\t" - "vqrshrn.u16 d0, q1, #8 \n\t" - "vqadd.u8 d0, d0, d12 \n\t" - - "vst1.32 d0[0], [%[d]] \n\t" - - AP "done:\n\t" - - : // output regs - // Input - : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (tmp) - : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","memory" // clobbered - - ); -#undef AP - -} - -#define _op_blend_caa_dp_neon _op_blend_c_dp_neon - -#define _op_blend_c_dpan_neon _op_blend_c_dp_neon -#define _op_blend_caa_dpan_neon _op_blend_c_dpan_neon - -static void -init_blend_color_span_funcs_neon(void) -{ - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_c_dp_neon; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_caa_dp_neon; - - op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_c_dpan_neon; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = 256 - (c >> 24); - *d = c + MUL_256(s, *d); -} - -#define _op_blend_pt_caa_dp_neon _op_blend_pt_c_dp_neon - -#define _op_blend_pt_c_dpan_neon _op_blend_pt_c_dp_neon -#define _op_blend_pt_caa_dpan_neon _op_blend_pt_c_dpan_neon - -static void -init_blend_color_pt_funcs_neon(void) -{ - op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_c_dp_neon; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_caa_dp_neon; - - op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_c_dpan_neon; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_caa_dpan_neon; -} -#endif -/*-----*/ - -/* blend_rel color -> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_rel_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha = 256 - (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); - d++; - }); -} - -#define _op_blend_rel_caa_dp_neon _op_blend_rel_c_dp_neon - -#define _op_blend_rel_c_dpan_neon _op_blend_c_dpan_neon -#define _op_blend_rel_caa_dpan_neon _op_blend_caa_dpan_neon - -static void -init_blend_rel_color_span_funcs_neon(void) -{ - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_c_dp_neon; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_caa_dp_neon; - - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_c_dpan_neon; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_rel_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = *d >> 24; - *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); -} - -#define _op_blend_rel_pt_caa_dp_neon _op_blend_rel_pt_c_dp_neon - -#define _op_blend_rel_pt_c_dpan_neon _op_blend_pt_c_dpan_neon -#define _op_blend_rel_pt_caa_dpan_neon _op_blend_pt_caa_dpan_neon - -static void -init_blend_rel_color_pt_funcs_neon(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_pt_c_dp_neon; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_caa_dp_neon; - - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_c_dpan_neon; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c deleted file mode 100644 index 1843265..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c +++ /dev/null @@ -1,167 +0,0 @@ -/* blend color -> dst */ - -#ifdef BUILD_SSE3 - -static void -_op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - DATA32 a = 256 - (c >> 24); - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - const __m128i a_packed = _mm_set_epi32(a, a, a, a); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - *d = c + MUL_256(a, *d); - d++; l--; - }, - { /* A4OP */ - - __m128i d0 = _mm_load_si128((__m128i *)d); - - d0 = mul_256_sse3(a_packed, d0); - d0 = _mm_add_epi32(d0, c_packed); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; l -= 4; - }, - { /* A8OP */ - - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - d0 = mul_256_sse3(a_packed, d0); - d1 = mul_256_sse3(a_packed, d1); - - d0 = _mm_add_epi32(d0, c_packed); - d1 = _mm_add_epi32(d1, c_packed); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; l -= 8; - }) -} - -#define _op_blend_caa_dp_sse3 _op_blend_c_dp_sse3 - -#define _op_blend_c_dpan_sse3 _op_blend_c_dp_sse3 -#define _op_blend_caa_dpan_sse3 _op_blend_c_dpan_sse3 - -static void -init_blend_color_span_funcs_sse3(void) -{ -// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) -// op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; - -// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) -// op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_c_dpan_sse3; - op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_caa_dpan_sse3; -} - -#define _op_blend_pt_c_dp_sse3 NULL -#define _op_blend_pt_caa_dp_sse3 _op_blend_pt_c_dp_sse3 - -#define _op_blend_pt_c_dpan_sse3 _op_blend_pt_c_dp_sse3 -#define _op_blend_pt_caa_dpan_sse3 _op_blend_pt_c_dpan_sse3 - -#define _op_blend_pt_c_dpas_sse3 _op_blend_pt_c_dp_sse3 -#define _op_blend_pt_caa_dpas_sse3 _op_blend_pt_c_dp_sse3 - -static void -init_blend_color_pt_funcs_sse3(void) -{ - op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_c_dp_sse3; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_caa_dp_sse3; - - op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_c_dpan_sse3; - op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_caa_dpan_sse3; -} - - -/*-----*/ - -/* blend_rel color -> dst */ - -static void -_op_blend_rel_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - int alpha = 256 - (c >> 24); - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - const __m128i alpha_packed = _mm_set_epi32(alpha, alpha, alpha, alpha); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); - d++; l--; - }, - { /* A4OP */ - - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i mul0 = mul_256_sse3(alpha_packed, d0); - __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); - - d0 = _mm_add_epi32(mul0, sym0); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; l -= 4; - }, - { /* A8OP */ - - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i mul0 = mul_256_sse3(alpha_packed, d0); - __m128i mul1 = mul_256_sse3(alpha_packed, d1); - - __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); - __m128i sym1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c_packed); - - d0 = _mm_add_epi32(mul0, sym0); - d1 = _mm_add_epi32(mul1, sym1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; l -= 8; - }) -} - -#define _op_blend_rel_caa_dp_sse3 _op_blend_rel_c_dp_sse3 -#define _op_blend_rel_c_dpan_sse3 _op_blend_c_dpan_sse3 -#define _op_blend_rel_caa_dpan_sse3 _op_blend_caa_dpan_sse3 - -static void -init_blend_rel_color_span_funcs_sse3(void) -{ - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_c_dp_sse3; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_caa_dp_sse3; - - op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_c_dpan_sse3; - op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_caa_dpan_sse3; -} - -#define _op_blend_rel_pt_c_dp_sse3 NULL -#define _op_blend_rel_pt_caa_dp_sse3 _op_blend_rel_pt_c_dp_sse3 - -#define _op_blend_rel_pt_c_dpan_sse3 _op_blend_pt_c_dpan_sse3 -#define _op_blend_rel_pt_caa_dpan_sse3 _op_blend_pt_caa_dpan_sse3 - -static void -init_blend_rel_color_pt_funcs_sse3(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_c_dp_sse3; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_caa_dp_sse3; - - op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_c_dpan_sse3; - op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_caa_dpan_sse3; -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c deleted file mode 100644 index 12a0a75..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c +++ /dev/null @@ -1,185 +0,0 @@ -/* blend mask x color -> dst */ - -#ifdef BUILD_C -static void -_op_blend_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha = 256 - (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 a = *m; - switch(a) - { - case 0: - break; - case 255: - *d = c + MUL_256(alpha, *d); - break; - default: - { - DATA32 mc = MUL_SYM(a, c); - a = 256 - (mc >> 24); - *d = mc + MUL_256(a, *d); - } - break; - } - m++; d++; - }); -} - -static void -_op_blend_mas_can_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = c; - break; - default: - alpha++; - *d = INTERP_256(alpha, c, *d); - break; - } - m++; d++; - }); -} - -#define _op_blend_mas_cn_dp _op_blend_mas_can_dp -#define _op_blend_mas_caa_dp _op_blend_mas_c_dp - -#define _op_blend_mas_c_dpan _op_blend_mas_c_dp -#define _op_blend_mas_cn_dpan _op_blend_mas_cn_dp -#define _op_blend_mas_can_dpan _op_blend_mas_can_dp -#define _op_blend_mas_caa_dpan _op_blend_mas_caa_dp - -static void -init_blend_mask_color_span_funcs_c(void) -{ - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_mas_c_dp; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_mas_cn_dp; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_mas_can_dp; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_mas_caa_dp; - - op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_mas_c_dpan; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_mas_cn_dpan; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_mas_can_dpan; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, c); - m = 256 - (s >> 24); - *d = s + MUL_256(m, *d); -} - -static void -_op_blend_pt_mas_can_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { - *d = INTERP_256(m + 1, c, *d); -} - -#define _op_blend_pt_mas_cn_dp _op_blend_pt_mas_can_dp -#define _op_blend_pt_mas_caa_dp _op_blend_pt_mas_c_dp - -#define _op_blend_pt_mas_c_dpan _op_blend_pt_mas_c_dp -#define _op_blend_pt_mas_cn_dpan _op_blend_pt_mas_cn_dp -#define _op_blend_pt_mas_can_dpan _op_blend_pt_mas_can_dp -#define _op_blend_pt_mas_caa_dpan _op_blend_pt_mas_caa_dp - -static void -init_blend_mask_color_pt_funcs_c(void) -{ - op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_pt_mas_c_dp; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_mas_cn_dp; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_pt_mas_can_dp; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_pt_mas_caa_dp; - - op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_pt_mas_c_dpan; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_mas_cn_dpan; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_pt_mas_can_dpan; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_pt_mas_caa_dpan; -} -#endif - -/*-----*/ - -/* blend_rel mask x color --> dst */ - -#ifdef BUILD_C -static void -_op_blend_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 mc = MUL_SYM(*m, c); - alpha = 256 - (mc >> 24); - *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); - d++; - m++; - }); -} - -#define _op_blend_rel_mas_cn_dp _op_blend_rel_mas_c_dp -#define _op_blend_rel_mas_can_dp _op_blend_rel_mas_c_dp -#define _op_blend_rel_mas_caa_dp _op_blend_rel_mas_c_dp - -#define _op_blend_rel_mas_c_dpan _op_blend_mas_c_dpan -#define _op_blend_rel_mas_cn_dpan _op_blend_mas_cn_dpan -#define _op_blend_rel_mas_can_dpan _op_blend_mas_can_dpan -#define _op_blend_rel_mas_caa_dpan _op_blend_mas_caa_dpan - -static void -init_blend_rel_mask_color_span_funcs_c(void) -{ - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_mas_c_dp; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_mas_can_dp; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_mas_can_dp; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_mas_caa_dp; - - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_mas_c_dpan; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_mas_cn_dpan; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_mas_can_dpan; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, c); - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -#define _op_blend_rel_pt_mas_cn_dp _op_blend_rel_pt_mas_c_dp -#define _op_blend_rel_pt_mas_can_dp _op_blend_rel_pt_mas_c_dp -#define _op_blend_rel_pt_mas_caa_dp _op_blend_rel_pt_mas_c_dp - -#define _op_blend_rel_pt_mas_c_dpan _op_blend_pt_mas_c_dpan -#define _op_blend_rel_pt_mas_cn_dpan _op_blend_pt_mas_cn_dpan -#define _op_blend_rel_pt_mas_can_dpan _op_blend_pt_mas_can_dpan -#define _op_blend_rel_pt_mas_caa_dpan _op_blend_pt_mas_caa_dpan - -static void -init_blend_rel_mask_color_pt_funcs_c(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_pt_mas_c_dp; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_mas_cn_dp; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_pt_mas_can_dp; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_pt_mas_caa_dp; - - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_pt_mas_c_dpan; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_mas_cn_dpan; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_mas_can_dpan; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_mas_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c deleted file mode 100644 index f8fe02e..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c +++ /dev/null @@ -1,251 +0,0 @@ -/* blend mask x color -> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_P2R(c, mm2, mm0) - c = 256 - (c >> 24); - MOV_A2R(c, mm4) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm4, mm1) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - break; - default: - l++; - MOV_A2R(l, mm3) - MUL4_256_R2R(mm2, mm3) - - MOV_RA2R(mm3, mm1) - movq_r2r(mm6, mm7); - psubw_r2r(mm1, mm7); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm7, mm1) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -static void -_op_blend_mas_can_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = c; - break; - default: - l++; - MOV_A2R(l, mm3) - MOV_P2R(*d, mm1, mm0) - movq_r2r(mm2, mm4); - INTERP_256_R2R(mm3, mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -#define _op_blend_mas_cn_dp_mmx _op_blend_mas_can_dp_mmx -#define _op_blend_mas_caa_dp_mmx _op_blend_mas_c_dp_mmx - -#define _op_blend_mas_c_dpan_mmx _op_blend_mas_c_dp_mmx -#define _op_blend_mas_cn_dpan_mmx _op_blend_mas_cn_dp_mmx -#define _op_blend_mas_can_dpan_mmx _op_blend_mas_can_dp_mmx -#define _op_blend_mas_caa_dpan_mmx _op_blend_mas_caa_dp_mmx - -static void -init_blend_mask_color_span_funcs_mmx(void) -{ - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_mas_c_dp_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_mas_cn_dp_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_mas_can_dp_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_mas_caa_dp_mmx; - - op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_mas_c_dpan_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_mas_cn_dpan_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_mas_can_dpan_mmx; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_mas_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = m + 1; - MOV_A2R(s, mm3) - MOV_A2R(ALPHA_256, mm6) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MUL4_256_R2R(mm2, mm3) - - MOV_RA2R(mm3, mm1) - psubw_r2r(mm1, mm6); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm6, mm1) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_blend_pt_mas_cn_dp_mmx _op_blend_pt_mas_c_dp_mmx -#define _op_blend_pt_mas_can_dp_mmx _op_blend_pt_mas_c_dp_mmx -#define _op_blend_pt_mas_caa_dp_mmx _op_blend_pt_mas_c_dp_mmx - -#define _op_blend_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dp_mmx -#define _op_blend_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dp_mmx -#define _op_blend_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dp_mmx -#define _op_blend_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dp_mmx - -static void -init_blend_mask_color_pt_funcs_mmx(void) -{ - op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_pt_mas_c_dp_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_mas_cn_dp_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_pt_mas_can_dp_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_pt_mas_caa_dp_mmx; - - op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_pt_mas_c_dpan_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_mas_cn_dpan_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_mas_can_dpan_mmx; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_mas_caa_dpan_mmx; -} -#endif - -/*-----*/ - -/* blend_rel mask x color -> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(c, mm2, mm0) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - default: - l++; - MOV_A2R(l, mm3) - MUL4_256_R2R(mm2, mm3) - - MOV_RA2R(mm3, mm1) - movq_r2r(mm6, mm7); - psubw_r2r(mm1, mm7); - - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm7, mm1) - - MUL4_SYM_R2R(mm4, mm3, mm5) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -#define _op_blend_rel_mas_cn_dp_mmx _op_blend_rel_mas_c_dp_mmx -#define _op_blend_rel_mas_can_dp_mmx _op_blend_rel_mas_c_dp_mmx -#define _op_blend_rel_mas_caa_dp_mmx _op_blend_rel_mas_c_dp_mmx - -#define _op_blend_rel_mas_c_dpan_mmx _op_blend_mas_c_dpan_mmx -#define _op_blend_rel_mas_cn_dpan_mmx _op_blend_mas_cn_dpan_mmx -#define _op_blend_rel_mas_can_dpan_mmx _op_blend_mas_can_dpan_mmx -#define _op_blend_rel_mas_caa_dpan_mmx _op_blend_mas_caa_dpan_mmx - -static void -init_blend_rel_mask_color_span_funcs_mmx(void) -{ - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_mas_c_dp_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_mas_cn_dp_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_mas_can_dp_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_mas_caa_dp_mmx; - - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_mas_c_dpan_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_mas_cn_dpan_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_mas_can_dpan_mmx; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_mas_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - s = m + 1; - MOV_A2R(s, mm3) - MOV_P2R(c, mm2, mm0) - MUL4_256_R2R(mm2, mm3) - - MOV_RA2R(mm3, mm1) - psubw_r2r(mm1, mm6); - - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm6, mm1) - - MUL4_SYM_R2R(mm4, mm3, mm5) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_rel_pt_mas_cn_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx -#define _op_blend_rel_pt_mas_can_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx -#define _op_blend_rel_pt_mas_caa_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx - -#define _op_blend_rel_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dpan_mmx -#define _op_blend_rel_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dpan_mmx -#define _op_blend_rel_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dpan_mmx -#define _op_blend_rel_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dpan_mmx - -static void -init_blend_rel_mask_color_pt_funcs_mmx(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_pt_mas_c_dp_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_mas_cn_dp_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_pt_mas_can_dp_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_mas_caa_dp_mmx; - - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_c_dpan_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_cn_dpan_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_can_dpan_mmx; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c deleted file mode 100644 index f5eb480..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c +++ /dev/null @@ -1,562 +0,0 @@ -#define NEONDEBUG 0 - - -#if NEONDEBUG -#define DEBUG_FNCOUNT(x) \ - do { \ - static int _foo = 0; \ - if (_foo++%10000 ==0) \ - printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\ - _foo, x " optimised");\ - } while (0) -#else -#define DEBUG_FNCOUNT(x) ((void)x) -#endif - - -/* blend mask x color -> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - - DEBUG_FNCOUNT(""); - -#define AP "blend_mas_c_dp_" - asm volatile ( - ".fpu neon \n\t" - " vdup.i32 q15, %[c] \n\t" - " vmov.i8 q14, #1 \n\t" - - // If aligned already - straight to quads - " andS %[tmp], %[d],$0xf \n\t" - " beq "AP"quadloops \n\t" - - " andS %[tmp], %[d],$0x4 \n\t" - " beq "AP"dualloop \n\t" - - AP"singleloop: \n\t" - " vld1.8 d0[0], [%[m]]! \n\t" - " vld1.32 d4[0], [%[d]] \n\t" - " vdup.u8 d0, d0[0] \n\t" - " vmull.u8 q4, d0, d30 \n\t" - " vqrshrn.u16 d12, q4, #8 \n\t" - " vmvn.u16 d14, d12 \n\t" - " vshr.u32 d16, d14, #24 \n\t" - " vmul.u32 d16, d16, d28 \n\t" - " vmull.u8 q7, d16, d4 \n\t" - " vqrshrn.u16 d0, q7, #8 \n\t" - " vqadd.u8 d0, d0, d12 \n\t" - " vst1.32 d0[0], [%[d]]! \n\t" - - // Can we go the fast path? - " andS %[tmp], %[d],$0xf \n\t" - " beq "AP"quadloops \n\t" - - AP"dualloop: \n\t" - " sub %[tmp], %[e], %[d] \n\t" - " cmp %[tmp], #16 \n\t" - " blt "AP"loopout \n\t" - - " vld1.16 d0[0], [%[m]]! \n\t" - " vldm %[d], {d4} \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 q0, q14 \n\t" - " vmull.u8 q4, d0, d30 \n\t" - " vqrshrn.u16 d12, q4, #8 \n\t" - " vmvn.u16 d14, d12 \n\t" - " vshr.u32 d16, d14, #24 \n\t" - " vmul.u32 d16, d16, d28 \n\t" - " vmull.u8 q7, d16, d4 \n\t" - " vqrshrn.u16 d0, q7, #8 \n\t" - " vqadd.u8 q0, q0, q6 \n\t" - " vstm %[d]!, {d0} \n\t" - - AP"quadloops: \n\t" - " sub %[tmp], %[e], %[d] \n\t" - " cmp %[tmp], #16 \n\t" - " blt "AP"loopout \n\t" - - - " sub %[tmp], %[e], #15 \n\t" - - " sub %[d], #16 \n\t" - AP"fastloop:" - " add %[d], #16 \n\t" - " cmp %[tmp], %[d] \n\t" - " ble "AP"loopout \n\t" - AP"quadloopint: \n\t" - " ldr %[x], [%[m]] \n\t" - " add %[m], #4 \n\t" - " cmp %[x], #0 \n\t" - " beq "AP"fastloop \n\t" - " vmov.32 d0[0], %[x] \n\t" - " vldm %[d], {d4,d5} \n\t" - - // Expand M: Fixme: Can we do this quicker? - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 q0, q14 \n\t" - - // Multiply a * c - " vmull.u8 q4, d0, d30 \n\t" - " vmull.u8 q5, d1, d31 \n\t" - - // Shorten - " vqrshrn.u16 d12, q4, #8 \n\t" - " vqrshrn.u16 d13, q5, #8 \n\t" - - // extract negated alpha - " vmvn.u16 q7, q6 \n\t" - " vshr.u32 q8, q7, #24 \n\t" - " vmul.u32 q8, q8, q14 \n\t" - - // Multiply - " vmull.u8 q7, d16, d4 \n\t" - " vmull.u8 q8, d17, d5 \n\t" - - " vqrshrn.u16 d0, q7, #8 \n\t" - " vqrshrn.u16 d1, q8, #8 \n\t" - - // Add - " vqadd.u8 q0, q0, q6 \n\t" - - " vstm %[d]!, {d0,d1} \n\t" - - " cmp %[tmp], %[d] \n\t" - " bhi "AP"quadloopint \n\t" - - AP"loopout: \n\t" -#if NEONDEBUG - "cmp %[d], %[e] \n\t" - "ble "AP"foo \n\t" - "cmp %[tmp], %[m] \n\t" - "sub %[x], %[x] \n\t" - "vst1.32 d0[0], [%[x]] \n\t" - AP"foo: \n\t" -#endif - - " cmp %[d], %[e] \n\t" - " beq "AP"done \n\t" - " sub %[tmp],%[e], %[d] \n\t" - " cmp %[tmp],#4 \n\t" - " beq "AP"singleout \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],$0x8 \n\t" - " vld1.16 d0[0], [%[m]]! \n\t" - " vldm %[d], {d4} \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 q0, q14 \n\t" - " vmull.u8 q4, d0, d30 \n\t" - " vqrshrn.u16 d12, q4, #8 \n\t" - " vmvn.u16 d14, d12 \n\t" - " vshr.u32 d16, d14, #24 \n\t" - " vmul.u32 d16, d16, d28 \n\t" - " vmull.u8 q7, d16, d4 \n\t" - " vqrshrn.u16 d0, q7, #8 \n\t" - " vqadd.u8 q0, q0, q6 \n\t" - " vstm %[d]!, {d0} \n\t" - - " cmp %[e], %[d] \n\t" - " beq "AP"done \n\t" - - AP"singleout: \n\t" - " vld1.8 d0[0], [%[m]]! \n\t" - " vld1.32 d4[0], [%[d]] \n\t" - " vdup.u8 d0, d0[0] \n\t" - " vmull.u8 q4, d0, d30 \n\t" - " vqrshrn.u16 d12, q4, #8 \n\t" - " vmvn.u16 d14, d12 \n\t" - " vshr.u32 d16, d14, #24 \n\t" - " vmul.u32 d16, d16, d28 \n\t" - " vmull.u8 q7, d16, d4 \n\t" - " vqrshrn.u16 d0, q7, #8 \n\t" - " vqadd.u8 q0, q0, q6 \n\t" - " vst1.32 d0[0], [%[d]]! \n\t" - - AP"done: \n\t" -#if NEONDEBUG - "cmp %[d], %[e] \n\t" - "beq "AP"reallydone \n\t" - "sub %[tmp], %[tmp] \n\t" - "vst1.32 d0[0], [%[tmp]] \n\t" - AP"reallydone:" -#endif - : // Out - : [e] "r" (d + l), [d] "r" (d), [c] "r" (c), - [tmp] "r" (7), [m] "r" (m), [x] "r" (0) - : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","q14","q15", - "memory" // clobbered - ); -#undef AP -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_mas_can_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e,*tmp; - int alpha; - - DEBUG_FNCOUNT(""); - -#define AP "_blend_mas_can_dp_neon_" - asm volatile ( - ".fpu neon \n\t" - "vdup.u32 q9, %[c] \n\t" - "vmov.i8 q15, #1 \n\t" - "vmov.i8 q14, #0 \n\t" - - // Make C 16 bit (C in q3/q2) - "vmovl.u8 q3, d19 \n\t" - "vmovl.u8 q2, d18 \n\t" - - // Which loop to start - " andS %[tmp], %[d],$0xf \n\t" - " beq "AP"quadloop \n\t" - - " andS %[tmp], %[d], #4 \n\t" - " beq "AP"dualstart \n\t" - - - AP"singleloop: \n\t" - " vld1.8 d0[0], [%[m]]! \n\t" - " vld1.32 d8[0], [%[d]] \n\t" - " vdup.u8 d0, d0[0] \n\t" - " vshr.u8 d0, d0, #1 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q4, d8 \n\t" - " vsub.s16 q6, q2, q4 \n\t" - " vmul.s16 q6, q0 \n\t" - " vshr.s16 q6, #7 \n\t" - " vadd.s16 q6, q4 \n\t" - " vqmovun.s16 d2, q6 \n\t" - " vst1.32 d2[0], [%[d]]! \n\t" - - " andS %[tmp], %[d], $0xf \n\t" - " beq "AP"quadloop \n\t" - - AP"dualstart: \n\t" - " sub %[tmp], %[e], %[d] \n\t" - " cmp %[tmp], #16 \n\t" - " blt "AP"loopout \n\t" - - AP"dualloop: \n\t" - " vld1.16 d0[0], [%[m]]! \n\t" - " vldm %[d], {d8} \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 d0, d0, d30 \n\t" - " vshr.u8 d0, d0, #1 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q4, d8 \n\t" - " vsub.s16 q6, q2, q4 \n\t" - " vmul.s16 q6, q0 \n\t" - " vshr.s16 q6, #7 \n\t" - " vadd.s16 q6, q4 \n\t" - " vqmovun.s16 d2, q6 \n\t" - " vstm %[d]!, {d2} \n\t" - - AP"quadloop: \n\t" - " sub %[tmp], %[e], %[d] \n\t" - " cmp %[tmp], #16 \n\t" - " blt "AP"loopout \n\t" - " sub %[tmp], %[e], #15 \n\t" - - " sub %[d], #16 \n\t" - AP"fastloop: \n\t" - " add %[d], #16 \n\t" - " cmp %[tmp], %[d] \n\t" - " blt "AP"loopout \n\t" - - AP"quadloopint: \n\t" - // Load the mask: 4 bytes: It has d0/d1 - " ldr %[x], [%[m]] \n\t" - " add %[m], #4 \n\t" - - // Check for shortcuts - " cmp %[x], #0 \n\t" - " beq "AP"fastloop \n\t" - - " cmp %[x], $0xffffffff \n\t" - " beq "AP"quadstore \n\t" - - " vmov.32 d0[0], %[x] \n\t" - // Load d into d8/d9 q4 - " vldm %[d], {d8,d9} \n\t" - - // Get the alpha channel ready (m) - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 q0, q0,q15 \n\t" - // Lop a bit off to prevent overflow - " vshr.u8 q0, q0, #1 \n\t" - - // Now make it 16 bit - " vmovl.u8 q1, d1 \n\t" - " vmovl.u8 q0, d0 \n\t" - - // 16 bit 'd' - " vmovl.u8 q5, d9 \n\t" - " vmovl.u8 q4, d8 \n\t" - - // Diff 'd' & 'c' - " vsub.s16 q7, q3, q5 \n\t" - " vsub.s16 q6, q2, q4 \n\t" - - " vmul.s16 q7, q1 \n\t" - " vmul.s16 q6, q0 \n\t" - - // Shift results a bit - " vshr.s16 q7, #7 \n\t" - " vshr.s16 q6, #7 \n\t" - - // Add 'd' - " vadd.s16 q7, q5 \n\t" - " vadd.s16 q6, q4 \n\t" - - // Make sure none are negative - " vqmovun.s16 d9, q7 \n\t" - " vqmovun.s16 d8, q6 \n\t" - - " vstm %[d]!, {d8,d9} \n\t" - - " cmp %[tmp], %[d] \n\t" - " bhi "AP"quadloopint \n\t" - " b "AP"loopout \n\t" - - AP"quadstore: \n\t" - " vstm %[d]!, {d18,d19} \n\t" - " cmp %[tmp], %[d] \n\t" - " bhi "AP"quadloopint \n\t" - - AP"loopout: \n\t" -#if NEONDEBUG - "cmp %[d], %[e] \n\t" - "ble "AP"foo \n\t" - "sub %[tmp], %[tmp] \n\t" - "vst1.32 d0[0], [%[tmp]] \n\t" - AP"foo: \n\t" -#endif - - " cmp %[e], %[d] \n\t" - " beq "AP"done \n\t" - - " sub %[tmp],%[e], %[d] \n\t" - " cmp %[tmp],#8 \n\t" - - " blt "AP"onebyte \n\t" - - // Load the mask: 2 bytes: It has d0 - " vld1.16 d0[0], [%[m]]! \n\t" - - // Load d into d8/d9 q4 - " vldm %[d], {d8} \n\t" - - // Get the alpha channel ready (m) - " vmovl.u8 q0, d0 \n\t" - " vmovl.u8 q0, d0 \n\t" - " vmul.u32 d0, d0, d30 \n\t" - // Lop a bit off to prevent overflow - " vshr.u8 d0, d0, #1 \n\t" - - // Now make it 16 bit - " vmovl.u8 q0, d0 \n\t" - - // 16 bit 'd' - " vmovl.u8 q4, d8 \n\t" - - // Diff 'd' & 'c' - " vsub.s16 q6, q2, q4 \n\t" - - " vmul.s16 q6, q0 \n\t" - - // Shift results a bit - " vshr.s16 q6, #7 \n\t" - - // Add 'd' - "vadd.s16 q6, q4 \n\t" - - // Make sure none are negative - "vqmovun.s16 d2, q6 \n\t" - - "vstm %[d]!, {d2} \n\t" - - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP"onebyte: \n\t" - "vld1.8 d0[0], [%[m]]! \n\t" - "vld1.32 d8[0], [%[d]] \n\t" - "vdup.u8 d0, d0[0] \n\t" - "vshr.u8 d0, d0, #1 \n\t" - "vmovl.u8 q0, d0 \n\t" - "vmovl.u8 q4, d8 \n\t" - "vsub.s16 q6, q2, q4 \n\t" - "vmul.s16 q6, q0 \n\t" - "vshr.s16 q6, #7 \n\t" - "vadd.s16 q6, q4 \n\t" - "vqmovun.s16 d2, q6 \n\t" - "vst1.32 d2[0], [%[d]]! \n\t" - - - AP"done: \n\t" -#if NEONDEBUG - "cmp %[d], %[e] \n\t" - "beq "AP"reallydone \n\t" - "sub %[m], %[m] \n\t" - "vst1.32 d0[0], [%[m]] \n\t" - AP"reallydone:" -#endif - - - : // output regs - // Input - : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), - [m] "r" (m), [tmp] "r" (7), [x] "r" (33) - : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q9","q14","q15", - "memory" // clobbered - - ); -#undef AP -} -#endif - -#ifdef BUILD_NEON -#define _op_blend_mas_cn_dp_neon _op_blend_mas_can_dp_neon -#define _op_blend_mas_caa_dp_neon _op_blend_mas_c_dp_neon - -#define _op_blend_mas_c_dpan_neon _op_blend_mas_c_dp_neon -#define _op_blend_mas_cn_dpan_neon _op_blend_mas_cn_dp_neon -#define _op_blend_mas_can_dpan_neon _op_blend_mas_can_dp_neon -#define _op_blend_mas_caa_dpan_neon _op_blend_mas_caa_dp_neon - -static void -init_blend_mask_color_span_funcs_neon(void) -{ - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_mas_c_dp_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_mas_cn_dp_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_mas_can_dp_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_mas_caa_dp_neon; - - op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_mas_c_dpan_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_mas_cn_dpan_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_mas_can_dpan_neon; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_mas_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, c); - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - - -#define _op_blend_pt_mas_cn_dp_neon _op_blend_pt_mas_c_dp_neon -#define _op_blend_pt_mas_can_dp_neon _op_blend_pt_mas_c_dp_neon -#define _op_blend_pt_mas_caa_dp_neon _op_blend_pt_mas_c_dp_neon - -#define _op_blend_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dp_neon -#define _op_blend_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dp_neon -#define _op_blend_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dp_neon -#define _op_blend_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dp_neon - -static void -init_blend_mask_color_pt_funcs_neon(void) -{ - op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_pt_mas_c_dp_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_mas_cn_dp_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_pt_mas_can_dp_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_pt_mas_caa_dp_neon; - - op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_pt_mas_c_dpan_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_mas_cn_dpan_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_mas_can_dpan_neon; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_mas_caa_dpan_neon; -} -#endif - -/*-----*/ - -/* blend_rel mask x color -> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - - DEBUG_FNCOUNT("not"); - - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 mc = MUL_SYM(*m, c); - alpha = 256 - (mc >> 24); - *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); - d++; - m++; - }); -} - -#define _op_blend_rel_mas_cn_dp_neon _op_blend_rel_mas_c_dp_neon -#define _op_blend_rel_mas_can_dp_neon _op_blend_rel_mas_c_dp_neon -#define _op_blend_rel_mas_caa_dp_neon _op_blend_rel_mas_c_dp_neon - -#define _op_blend_rel_mas_c_dpan_neon _op_blend_mas_c_dpan_neon -#define _op_blend_rel_mas_cn_dpan_neon _op_blend_mas_cn_dpan_neon -#define _op_blend_rel_mas_can_dpan_neon _op_blend_mas_can_dpan_neon -#define _op_blend_rel_mas_caa_dpan_neon _op_blend_mas_caa_dpan_neon - -static void -init_blend_rel_mask_color_span_funcs_neon(void) -{ - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_mas_c_dp_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_mas_cn_dp_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_mas_can_dp_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_mas_caa_dp_neon; - - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_mas_c_dpan_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_mas_cn_dpan_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_mas_can_dpan_neon; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_mas_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, c); - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -#define _op_blend_rel_pt_mas_cn_dp_neon _op_blend_rel_pt_mas_c_dp_neon -#define _op_blend_rel_pt_mas_can_dp_neon _op_blend_rel_pt_mas_c_dp_neon -#define _op_blend_rel_pt_mas_caa_dp_neon _op_blend_rel_pt_mas_c_dp_neon - -#define _op_blend_rel_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dpan_neon -#define _op_blend_rel_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dpan_neon -#define _op_blend_rel_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dpan_neon -#define _op_blend_rel_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dpan_neon - -static void -init_blend_rel_mask_color_pt_funcs_neon(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_pt_mas_c_dp_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_mas_cn_dp_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_pt_mas_can_dp_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_mas_caa_dp_neon; - - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_c_dpan_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_cn_dpan_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_can_dpan_neon; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c deleted file mode 100644 index 5883d15..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c +++ /dev/null @@ -1,321 +0,0 @@ -/* blend mask x color -> dst */ - -#ifdef BUILD_SSE3 - -static void -_op_blend_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - DATA32 a = *m; - DATA32 mc = MUL_SYM(a, c); - a = 256 - (mc >> 24); - *d = mc + MUL_256(a, *d); - m++; d++; l--; - }, - { /* A4OP */ - - if ((m[3] | m[2] | m[1] | m[0]) == 0) { - m += 4; d += 4; l -= 4; - continue; - } - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i mc0 = mul_sym_sse3(m0, c_packed); - __m128i a0 = sub4_alpha_sse3(mc0); - __m128i mul0 = mul_256_sse3(a0, d0); - - mul0 = _mm_add_epi32(mul0, mc0); - - _mm_store_si128((__m128i *)d, mul0); - - m += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - if((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { - m += 8; d += 8; l -= 8; - continue; - } - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i mc0 = mul_sym_sse3(m0, c_packed); - __m128i a0 = sub4_alpha_sse3(mc0); - __m128i mul0 = mul_256_sse3(a0, d0); - - mul0 = _mm_add_epi32(mc0, mul0); - - __m128i mc1 = mul_sym_sse3(m1, c_packed); - __m128i a1 = sub4_alpha_sse3(mc1); - __m128i mul1 = mul_256_sse3(a1, d1); - - mul1 = _mm_add_epi32(mc1, mul1); - - _mm_store_si128((__m128i *)d, mul0); - _mm_store_si128((__m128i *)(d+4), mul1); - - m += 8; d += 8; l -= 8; - }) -} - -static void -_op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - - DATA32 alpha; - - const __m128i one = _mm_set_epi32(1, 1, 1, 1); - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = c; - break; - default: - alpha++; - *d = INTERP_256(alpha, c, *d); - break; - } - m++; d++; l--; - }, - { /* A4OP */ - - if ((m[3] | m[2] | m[1] | m[0]) == 0) { - m += 4; d += 4; l -= 4; - continue; - } - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); - - m0 = _mm_add_epi32(one, m0); - - __m128i r0 = interp4_256_sse3(m0, c_packed, d0); - - r0 = _mm_and_si128(~zm0, r0); - d0 = _mm_and_si128(zm0, d0); - - d0 = _mm_add_epi32(r0, d0); - - _mm_store_si128((__m128i *)d, d0); - - m += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { - m += 8; d += 8; l -= 8; - continue; - } - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); - __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); - - m0 = _mm_add_epi32(one, m0); - m1 = _mm_add_epi32(one, m1); - - __m128i r0 = interp4_256_sse3(m0, c_packed, d0); - __m128i r1 = interp4_256_sse3(m1, c_packed, d1); - - r0 = _mm_and_si128(~zm0, r0); - d0 = _mm_and_si128(zm0, d0); - - r1 = _mm_and_si128(~zm1, r1); - d1 = _mm_and_si128(zm1, d1); - - d0 = _mm_add_epi32(d0, r0); - d1 = _mm_add_epi32(d1, r1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - m += 8; d += 8; l -= 8; - }) -} - -#define _op_blend_mas_cn_dp_sse3 _op_blend_mas_can_dp_sse3 -#define _op_blend_mas_caa_dp_sse3 _op_blend_mas_c_dp_sse3 - -#define _op_blend_mas_c_dpan_sse3 _op_blend_mas_c_dp_sse3 -#define _op_blend_mas_cn_dpan_sse3 _op_blend_mas_cn_dp_sse3 -#define _op_blend_mas_can_dpan_sse3 _op_blend_mas_can_dp_sse3 -#define _op_blend_mas_caa_dpan_sse3 _op_blend_mas_caa_dp_sse3 - -static void -init_blend_mask_color_span_funcs_sse3(void) -{ -// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) -// op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3; - -// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text) -// op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3; - op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_mas_caa_dpan_sse3; -} - -#define _op_blend_pt_mas_c_dp_sse3 NULL -#define _op_blend_pt_mas_can_dp_sse3 NULL - -#define _op_blend_pt_mas_cn_dp_sse3 _op_blend_pt_mas_can_dp_sse3 -#define _op_blend_pt_mas_caa_dp_sse3 _op_blend_pt_mas_c_dp_sse3 - -#define _op_blend_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dp_sse3 -#define _op_blend_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dp_sse3 -#define _op_blend_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dp_sse3 -#define _op_blend_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dp_sse3 - -static void -init_blend_mask_color_pt_funcs_sse3(void) -{ - op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_pt_mas_c_dp_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_mas_cn_dp_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_pt_mas_can_dp_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_pt_mas_caa_dp_sse3; - - op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_pt_mas_c_dpan_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_mas_cn_dpan_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_mas_can_dpan_sse3; - op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_mas_caa_dpan_sse3; -} - -/*-----*/ - -/* blend_rel mask x color --> dst */ - -static void -_op_blend_rel_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - DATA32 mc = MUL_SYM(*m, c); - int alpha = 256 - (mc >> 24); - *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); - d++; m++; l--; - }, - { /* A4OP */ - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *) d); - - __m128i mc0 = mul_sym_sse3(m0, c_packed); - __m128i a0 = sub4_alpha_sse3(mc0); - - __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); - d0 = mul_256_sse3(a0, d0); - - d0 = _mm_add_epi32(d0, d0_sym); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; m += 4; l -= 4; - }, - { /* A8OP */ - - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i mc0 = mul_sym_sse3(m0, c_packed); - __m128i mc1 = mul_sym_sse3(m1, c_packed); - - __m128i a0 = sub4_alpha_sse3(mc0); - __m128i a1 = sub4_alpha_sse3(mc1); - - __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); - __m128i d1_sym = mul_sym_sse3(_mm_srli_epi32(d1, 24), mc1); - - d0 = mul_256_sse3(a0, d0); - d1 = mul_256_sse3(a1, d1); - - d0 = _mm_add_epi32(d0, d0_sym); - d1 = _mm_add_epi32(d1, d1_sym); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; m += 8; l -= 8; - }) -} - -#define _op_blend_rel_mas_cn_dp_sse3 _op_blend_rel_mas_c_dp_sse3 -#define _op_blend_rel_mas_can_dp_sse3 _op_blend_rel_mas_c_dp_sse3 -#define _op_blend_rel_mas_caa_dp_sse3 _op_blend_rel_mas_c_dp_sse3 - -#define _op_blend_rel_mas_c_dpan_sse3 _op_blend_mas_c_dpan_sse3 -#define _op_blend_rel_mas_cn_dpan_sse3 _op_blend_mas_cn_dpan_sse3 -#define _op_blend_rel_mas_can_dpan_sse3 _op_blend_mas_can_dpan_sse3 -#define _op_blend_rel_mas_caa_dpan_sse3 _op_blend_mas_caa_dpan_sse3 - -static void -init_blend_rel_mask_color_span_funcs_sse3(void) -{ - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_mas_c_dp_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_mas_caa_dp_sse3; - - op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_mas_c_dpan_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_mas_cn_dpan_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_mas_can_dpan_sse3; - op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_mas_caa_dpan_sse3; -} - -#define _op_blend_rel_pt_mas_c_dp_sse3 NULL - -#define _op_blend_rel_pt_mas_cn_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 -#define _op_blend_rel_pt_mas_can_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 -#define _op_blend_rel_pt_mas_caa_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 - -#define _op_blend_rel_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dpan_sse3 -#define _op_blend_rel_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dpan_sse3 -#define _op_blend_rel_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dpan_sse3 -#define _op_blend_rel_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dpan_sse3 - -static void -init_blend_rel_mask_color_pt_funcs_sse3(void) -{ - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_pt_mas_c_dp_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dp_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_mas_can_dp_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dp_sse3; - - op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_c_dpan_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dpan_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_can_dpan_sse3; - op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dpan_sse3; -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c deleted file mode 100644 index eac6755..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c +++ /dev/null @@ -1,77 +0,0 @@ -#define NEED_SSE3 1 - -#include "evas_common.h" - -#ifdef BUILD_SSE3 -static __m128i A_MASK_SSE3; -#endif - -extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -# include "op_blend_pixel_sse3.c" -# include "op_blend_color_sse3.c" -# include "op_blend_pixel_color_sse3.c" -# include "op_blend_pixel_mask_sse3.c" -# include "op_blend_mask_color_sse3.c" - -void -evas_common_op_blend_init_sse3(void) -{ -#ifdef BUILD_SSE3 - GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF); - RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00); - SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF); - RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF); - A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000); - ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256); - - init_blend_pixel_span_funcs_sse3(); - init_blend_pixel_color_span_funcs_sse3(); - init_blend_pixel_mask_span_funcs_sse3(); - init_blend_color_span_funcs_sse3(); - init_blend_mask_color_span_funcs_sse3(); - - init_blend_pixel_pt_funcs_sse3(); - init_blend_pixel_color_pt_funcs_sse3(); - init_blend_pixel_mask_pt_funcs_sse3(); - init_blend_color_pt_funcs_sse3(); - init_blend_mask_color_pt_funcs_sse3(); -#endif -} - -void -evas_common_op_blend_rel_init_sse3(void) -{ -#ifdef BUILD_SSE3 - init_blend_rel_pixel_span_funcs_sse3(); - init_blend_rel_pixel_color_span_funcs_sse3(); - init_blend_rel_pixel_mask_span_funcs_sse3(); - init_blend_rel_color_span_funcs_sse3(); - init_blend_rel_mask_color_span_funcs_sse3(); - - init_blend_rel_pixel_pt_funcs_sse3(); - init_blend_rel_pixel_color_pt_funcs_sse3(); - init_blend_rel_pixel_mask_pt_funcs_sse3(); - init_blend_rel_color_pt_funcs_sse3(); - init_blend_rel_mask_color_pt_funcs_sse3(); -#endif -} - -//#pragma GCC push_options -//#pragma GCC optimize ("O0") -void -evas_common_op_sse3_test(void) -{ -#ifdef BUILD_SSE3 - DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33}; - - s[0] = rand(); d[1] = rand(); - _op_blend_pas_dp_sse3(s, NULL, 0, d, 64); - evas_common_cpu_end_opt(); -#endif -} -//#pragma GCC pop_options diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c deleted file mode 100644 index 0ce78d8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c +++ /dev/null @@ -1,162 +0,0 @@ -/* blend pixel --> dst */ - -#ifdef BUILD_C -static void -_op_blend_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = 256 - (*s >> 24); - *d = *s++ + MUL_256(alpha, *d); - d++; - }); -} - -static void -_op_blend_pas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - switch (*s & 0xff000000) - { - case 0: - break; - case 0xff000000: - *d = *s; - break; - default: - alpha = 256 - (*s >> 24); - *d = *s + MUL_256(alpha, *d); - break; - } - s++; d++; - }); -} - -#define _op_blend_pan_dp NULL - -#define _op_blend_p_dpan _op_blend_p_dp -#define _op_blend_pas_dpan _op_blend_pas_dp -#define _op_blend_pan_dpan _op_blend_pan_dp - -static void -init_blend_pixel_span_funcs_c(void) -{ - op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_p_dp; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pas_dp; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pan_dp; - - op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_p_dpan; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pas_dpan; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pan_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - -#define _op_blend_pt_pas_dp _op_blend_pt_p_dp -#define _op_blend_pt_pan_dp NULL - -#define _op_blend_pt_p_dpan _op_blend_pt_p_dp -#define _op_blend_pt_pan_dpan _op_blend_pt_pan_dp -#define _op_blend_pt_pas_dpan _op_blend_pt_pas_dp - -static void -init_blend_pixel_pt_funcs_c(void) -{ - op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_p_dp; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pas_dp; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pan_dp; - - op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_dpan; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_dpan; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_dpan; -} -#endif - -/*-----*/ - -/* blend_rel pixel -> dst */ - -#ifdef BUILD_C -static void -_op_blend_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = 256 - (*s >> 24); - c = 1 + (*d >> 24); - *d = MUL_256(c, *s) + MUL_256(alpha, *d); - d++; - s++; - }); -} - -static void -_op_blend_rel_pan_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - c = 1 + (*d >> 24); - *d++ = MUL_256(c, *s); - s++; - }); -} - -#define _op_blend_rel_pas_dp _op_blend_rel_p_dp - -#define _op_blend_rel_p_dpan _op_blend_p_dpan -#define _op_blend_rel_pan_dpan _op_blend_pan_dpan -#define _op_blend_rel_pas_dpan _op_blend_pas_dpan - -static void -init_blend_rel_pixel_span_funcs_c(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_p_dp; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pas_dp; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pan_dp; - - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_dpan; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_dpan; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -static void -_op_blend_rel_pt_pan_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = MUL_SYM(*d >> 24, s); -} - -#define _op_blend_rel_pt_pas_dp _op_blend_rel_pt_p_dp - -#define _op_blend_rel_pt_p_dpan _op_blend_pt_p_dpan -#define _op_blend_rel_pt_pan_dpan _op_blend_pt_pan_dpan -#define _op_blend_rel_pt_pas_dpan _op_blend_pt_pas_dpan - -static void -init_blend_rel_pixel_pt_funcs_c(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_dp; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_dp; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_dp; - - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_dpan; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_dpan; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c deleted file mode 100644 index c5e40a0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c +++ /dev/null @@ -1,284 +0,0 @@ -/* blend pixel x color --> dst */ - -#ifdef BUILD_C -static void -_op_blend_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 sc = MUL4_SYM(c, *s); - alpha = 256 - (sc >> 24); - *d = sc + MUL_256(alpha, *d); - d++; - s++; - }); -} - -static void -_op_blend_pan_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha = 256 - (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); - d++; - s++; - }); -} - -static void -_op_blend_p_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = 256 - (*s >> 24); - *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); - d++; - s++; - }); -} - -static void -_op_blend_pan_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d++ = 0xff000000 + MUL3_SYM(c, *s); - s++; - }); -} - -static void -_op_blend_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - 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++; - }); -} - -static void -_op_blend_pan_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - c = 1 + (c & 0xff); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = INTERP_256(c, *s, *d); - d++; - s++; - }); -} - -#define _op_blend_pas_c_dp _op_blend_p_c_dp -#define _op_blend_pas_can_dp _op_blend_p_can_dp -#define _op_blend_pas_caa_dp _op_blend_p_caa_dp - -#define _op_blend_p_c_dpan _op_blend_p_c_dp -#define _op_blend_pas_c_dpan _op_blend_pas_c_dp -#define _op_blend_pan_c_dpan _op_blend_pan_c_dp -#define _op_blend_p_can_dpan _op_blend_p_can_dp -#define _op_blend_pas_can_dpan _op_blend_pas_can_dp -#define _op_blend_pan_can_dpan _op_blend_pan_can_dp -#define _op_blend_p_caa_dpan _op_blend_p_caa_dp -#define _op_blend_pas_caa_dpan _op_blend_pas_caa_dp -#define _op_blend_pan_caa_dpan _op_blend_pan_caa_dp - -static void -init_blend_pixel_color_span_funcs_c(void) -{ - op_blend_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_p_c_dp; - op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pas_c_dp; - op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pan_c_dp; - op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_p_can_dp; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pas_can_dp; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pan_can_dp; - op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_p_caa_dp; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pas_caa_dp; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pan_caa_dp; - - op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_p_c_dpan; - op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pas_c_dpan; - op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pan_c_dpan; - op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_p_can_dpan; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pas_can_dpan; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pan_can_dpan; - op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_p_caa_dpan; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pas_caa_dpan; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - -#define _op_blend_pt_pas_c_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_pan_c_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_p_can_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_pas_can_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_pan_can_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_p_caa_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_pas_caa_dp _op_blend_pt_p_c_dp -#define _op_blend_pt_pan_caa_dp _op_blend_pt_p_c_dp - -#define _op_blend_pt_p_c_dpan _op_blend_pt_p_c_dp -#define _op_blend_pt_pas_c_dpan _op_blend_pt_pas_c_dp -#define _op_blend_pt_pan_c_dpan _op_blend_pt_pan_c_dp -#define _op_blend_pt_p_can_dpan _op_blend_pt_p_can_dp -#define _op_blend_pt_pas_can_dpan _op_blend_pt_pas_can_dp -#define _op_blend_pt_pan_can_dpan _op_blend_pt_pan_can_dp -#define _op_blend_pt_p_caa_dpan _op_blend_pt_p_caa_dp -#define _op_blend_pt_pas_caa_dpan _op_blend_pt_pas_caa_dp -#define _op_blend_pt_pan_caa_dpan _op_blend_pt_pan_caa_dp - -static void -init_blend_pixel_color_pt_funcs_c(void) -{ - op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_pt_p_c_dp; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pt_pas_c_dp; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pt_pan_c_dp; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_p_can_dp; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pas_can_dp; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pan_can_dp; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_p_caa_dp; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pas_caa_dp; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pan_caa_dp; - - op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_p_c_dpan; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pas_c_dpan; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pan_c_dpan; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_p_can_dpan; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pas_can_dpan; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pan_can_dpan; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_p_caa_dpan; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pas_caa_dpan; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pan_caa_dpan; -} -#endif - -/*-----*/ - -/* blend_rel pixel x color -> dst */ - -#ifdef BUILD_C -static void -_op_blend_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 sc = MUL4_SYM(c, *s); - alpha = 256 - (sc >> 24); - *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); - d++; - s++; - }); -} - -#define _op_blend_rel_pas_c_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_pan_c_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_p_can_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_pas_can_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_pan_can_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_p_caa_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_pas_caa_dp _op_blend_rel_p_c_dp -#define _op_blend_rel_pan_caa_dp _op_blend_rel_p_c_dp - -#define _op_blend_rel_p_c_dpan _op_blend_p_c_dpan -#define _op_blend_rel_pas_c_dpan _op_blend_pas_c_dpan -#define _op_blend_rel_pan_c_dpan _op_blend_pan_c_dpan -#define _op_blend_rel_p_can_dpan _op_blend_p_can_dpan -#define _op_blend_rel_pas_can_dpan _op_blend_pas_can_dpan -#define _op_blend_rel_pan_can_dpan _op_blend_pan_can_dpan -#define _op_blend_rel_p_caa_dpan _op_blend_p_caa_dpan -#define _op_blend_rel_pas_caa_dpan _op_blend_pas_caa_dpan -#define _op_blend_rel_pan_caa_dpan _op_blend_pan_caa_dpan - -static void -init_blend_rel_pixel_color_span_funcs_c(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_p_c_dp; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pas_c_dp; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pan_c_dp; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_p_can_dp; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pas_can_dp; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pan_can_dp; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_p_caa_dp; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pas_caa_dp; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pan_caa_dp; - - op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_p_c_dpan; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pas_c_dpan; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pan_c_dpan; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_p_can_dpan; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pas_can_dpan; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pan_can_dpan; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_p_caa_dpan; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pas_caa_dpan; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -#define _op_blend_rel_pt_pas_c_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_pan_c_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_p_can_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_pas_can_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_pan_can_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_p_caa_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_pas_caa_dp _op_blend_rel_pt_p_c_dp -#define _op_blend_rel_pt_pan_caa_dp _op_blend_rel_pt_p_c_dp - -#define _op_blend_rel_pt_p_c_dpan _op_blend_pt_p_c_dpan -#define _op_blend_rel_pt_pas_c_dpan _op_blend_pt_pas_c_dpan -#define _op_blend_rel_pt_pan_c_dpan _op_blend_pt_pan_c_dpan -#define _op_blend_rel_pt_p_can_dpan _op_blend_pt_p_can_dpan -#define _op_blend_rel_pt_pas_can_dpan _op_blend_pt_pas_can_dpan -#define _op_blend_rel_pt_pan_can_dpan _op_blend_pt_pan_can_dpan -#define _op_blend_rel_pt_p_caa_dpan _op_blend_pt_p_caa_dpan -#define _op_blend_rel_pt_pas_caa_dpan _op_blend_pt_pas_caa_dpan -#define _op_blend_rel_pt_pan_caa_dpan _op_blend_pt_pan_caa_dpan - -static void -init_blend_rel_pixel_color_pt_funcs_c(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_p_c_dp; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pas_c_dp; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pan_c_dp; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_p_can_dp; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pas_can_dp; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pan_can_dp; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_p_caa_dp; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pas_caa_dp; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pan_caa_dp; - - op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_p_c_dpan; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pas_c_dpan; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pan_c_dpan; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_p_can_dpan; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pas_can_dpan; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pan_can_dpan; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_p_caa_dpan; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pas_caa_dpan; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pan_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c deleted file mode 100644 index 52751f4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c +++ /dev/null @@ -1,221 +0,0 @@ -/* blend pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - while (d < e) { - MOV_P2R(*s, mm3, mm0) - MUL4_SYM_R2R(mm2, mm3, mm5) - - MOV_RA2R(mm3, mm1) - movq_r2r(mm6, mm4); - psubw_r2r(mm1, mm4); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm4, mm1) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -static void -_op_blend_pan_can_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - MOV_P2R(*s, mm1, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -static void -_op_blend_pan_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c & 0xff); - MOV_A2R(c, mm2) - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - while (d < e) { - MOV_P2R(*s, mm3, mm0) - MOV_P2R(*d, mm1, mm0) - INTERP_256_R2R(mm2, mm3, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -#define _op_blend_pas_c_dp_mmx _op_blend_p_c_dp_mmx -#define _op_blend_pan_c_dp_mmx _op_blend_p_c_dp_mmx -#define _op_blend_p_can_dp_mmx _op_blend_p_c_dp_mmx -#define _op_blend_pas_can_dp_mmx _op_blend_p_c_dp_mmx -#define _op_blend_p_caa_dp_mmx _op_blend_p_c_dp_mmx -#define _op_blend_pas_caa_dp_mmx _op_blend_p_c_dp_mmx - -#define _op_blend_p_c_dpan_mmx _op_blend_p_c_dp_mmx -#define _op_blend_pas_c_dpan_mmx _op_blend_pas_c_dp_mmx -#define _op_blend_pan_c_dpan_mmx _op_blend_pan_c_dp_mmx -#define _op_blend_p_can_dpan_mmx _op_blend_p_can_dp_mmx -#define _op_blend_pas_can_dpan_mmx _op_blend_pas_can_dp_mmx -#define _op_blend_pan_can_dpan_mmx _op_blend_pan_can_dp_mmx -#define _op_blend_p_caa_dpan_mmx _op_blend_p_caa_dp_mmx -#define _op_blend_pas_caa_dpan_mmx _op_blend_pas_caa_dp_mmx -#define _op_blend_pan_caa_dpan_mmx _op_blend_pan_caa_dp_mmx - - -static void -init_blend_pixel_color_span_funcs_mmx(void) -{ - op_blend_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_p_c_dp_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pas_c_dp_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pan_c_dp_mmx; - op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_p_can_dp_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pas_can_dp_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pan_can_dp_mmx; - op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_p_caa_dp_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pas_caa_dp_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pan_caa_dp_mmx; - - op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_p_c_dpan_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pas_c_dpan_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pan_c_dpan_mmx; - op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_p_can_dpan_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pas_can_dpan_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pan_can_dpan_mmx; - op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_p_caa_dpan_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pas_caa_dpan_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pan_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - MOV_A2R(ALPHA_256, mm4) - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_P2R(s, mm3, mm0) - MUL4_SYM_R2R(mm2, mm3, mm5) - - MOV_RA2R(mm3, mm1) - psubw_r2r(mm1, mm4); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm4, mm1) - - paddw_r2r(mm3, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_pt_pas_c_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_c_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_p_can_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pas_can_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_can_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_p_caa_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pas_caa_dp_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_caa_dp_mmx _op_blend_pt_p_c_dp_mmx - -#define _op_blend_pt_p_c_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pas_c_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_c_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_p_can_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pas_can_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_can_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_p_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pas_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx -#define _op_blend_pt_pan_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx - -static void -init_blend_pixel_color_pt_funcs_mmx(void) -{ - op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_p_c_dp_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pas_c_dp_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pan_c_dp_mmx; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_p_can_dp_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pas_can_dp_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pan_can_dp_mmx; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_p_caa_dp_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pas_caa_dp_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pan_caa_dp_mmx; - - op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_p_c_dpan_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pas_c_dpan_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pan_c_dpan_mmx; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_p_can_dpan_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pas_can_dpan_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pan_can_dpan_mmx; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_p_caa_dpan_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pas_caa_dpan_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pan_caa_dpan_mmx; -} -#endif - -/*-----*/ - -/* blend_rel pixel x color -> dst */ - -#ifdef BUILD_MMX - -#define _op_blend_rel_p_c_dpan_mmx _op_blend_p_c_dpan_mmx -#define _op_blend_rel_pas_c_dpan_mmx _op_blend_pas_c_dpan_mmx -#define _op_blend_rel_pan_c_dpan_mmx _op_blend_pan_c_dpan_mmx -#define _op_blend_rel_p_can_dpan_mmx _op_blend_p_can_dpan_mmx -#define _op_blend_rel_pas_can_dpan_mmx _op_blend_pas_can_dpan_mmx -#define _op_blend_rel_pan_can_dpan_mmx _op_blend_pan_can_dpan_mmx -#define _op_blend_rel_p_caa_dpan_mmx _op_blend_p_caa_dpan_mmx -#define _op_blend_rel_pas_caa_dpan_mmx _op_blend_pas_caa_dpan_mmx -#define _op_blend_rel_pan_caa_dpan_mmx _op_blend_pan_caa_dpan_mmx - -static void -init_blend_rel_pixel_color_span_funcs_mmx(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_p_c_dpan_mmx; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pas_c_dpan_mmx; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pan_c_dpan_mmx; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_p_can_dpan_mmx; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pas_can_dpan_mmx; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pan_can_dpan_mmx; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_p_caa_dpan_mmx; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pas_caa_dpan_mmx; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pan_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX - -#define _op_blend_rel_pt_p_c_dpan_mmx _op_blend_pt_p_c_dpan_mmx -#define _op_blend_rel_pt_pas_c_dpan_mmx _op_blend_pt_pas_c_dpan_mmx -#define _op_blend_rel_pt_pan_c_dpan_mmx _op_blend_pt_pan_c_dpan_mmx -#define _op_blend_rel_pt_p_can_dpan_mmx _op_blend_pt_p_can_dpan_mmx -#define _op_blend_rel_pt_pas_can_dpan_mmx _op_blend_pt_pas_can_dpan_mmx -#define _op_blend_rel_pt_pan_can_dpan_mmx _op_blend_pt_pan_can_dpan_mmx -#define _op_blend_rel_pt_p_caa_dpan_mmx _op_blend_pt_p_caa_dpan_mmx -#define _op_blend_rel_pt_pas_caa_dpan_mmx _op_blend_pt_pas_caa_dpan_mmx -#define _op_blend_rel_pt_pan_caa_dpan_mmx _op_blend_pt_pan_caa_dpan_mmx - -static void -init_blend_rel_pixel_color_pt_funcs_mmx(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_c_dpan_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_c_dpan_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_c_dpan_mmx; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_can_dpan_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_can_dpan_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_can_dpan_mmx; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_caa_dpan_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_caa_dpan_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c deleted file mode 100644 index 6e35970..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c +++ /dev/null @@ -1,570 +0,0 @@ -/* blend pixel x color --> dst */ -#ifdef BUILD_NEON -/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of - * reads, then two writes, a miss on read is 'just' two reads */ -static void -_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { -#define AP "blend_p_c_dp_" - asm volatile ( - ".fpu neon \n\t" - // Load 'c' - "vdup.u32 q7, %[c] \n\t" - "vmov.i8 q6, #1 \n\t" - - // Choose a loop - "andS %[tmp], %[d], $0xf \n\t" - "beq "AP"quadstart \n\t" - - "andS %[tmp],%[d], $0x4 \n\t" - "beq "AP"dualloop \n\t" - - AP"singleloop:" - "vld1.32 d0[0], [%[s]]! \n\t" - "vld1.32 d2[0], [%[d]] \n\t" - // Mulitply s * c (= sc) - "vmull.u8 q4, d0,d14 \n\t" - // sc in d8 - "vqrshrn.u16 d4, q4, #8 \n\t" - - // sca in d9 - "vmvn.u32 d6, d4 \n\t" - "vshr.u32 d6, d6, #24 \n\t" - - "vmul.u32 d6, d12, d6 \n\t" - - /* d * alpha */ - "vmull.u8 q4, d6, d2 \n\t" - "vqrshrn.u16 d0, q4, #8 \n\t" - - "vqadd.u8 d2, d0, d4 \n\t" - - // Save dsc + sc - "vst1.32 d2[0], [%[d]]! \n\t" - - // Now where? - // Can we go the fast path? - "andS %[tmp], %[d],$0xf \n\t" - "beq "AP"quadstart \n\t" - - AP"dualloop: \n\t" - // Check we have enough to bother with! - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #16 \n\t" - "blt "AP"loopout \n\t" - - // load 's' -> q0, 'd' -> q1 - "vldm %[s]!, {d0} \n\t" - "vldm %[d], {d2} \n\t" - // Mulitply s * c (= sc) - "vmull.u8 q4, d0,d14 \n\t" - // sc in d8 - "vqrshrn.u16 d4, q4, #8 \n\t" - - // sca in d9 - "vmvn.u32 d6, d4 \n\t" - "vshr.u32 d6, d6, #24 \n\t" - - "vmul.u32 d6, d12, d6 \n\t" - - /* d * alpha */ - "vmull.u8 q4, d6, d2 \n\t" - "vqrshrn.u16 d0, q4, #8 \n\t" - - "vqadd.u8 d2, d0, d4 \n\t" - - // Save dsc + sc - "vst1.32 d2, [%[d]]! \n\t" - - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #16 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp], %[e], #15 \n\t" - - AP"quadloop:\n\t" - // load 's' -> q0, 'd' -> q1 - "vldm %[s]!, {d0,d1} \n\t" - "vldm %[d], {d2,d3} \n\t" - // Mulitply s * c (= sc) - "vmull.u8 q4, d0,d14 \n\t" - "vmull.u8 q5, d1,d14 \n\t" - - // Get sc & sc alpha - "vqrshrn.u16 d4, q4, #8 \n\t" - "vqrshrn.u16 d5, q5, #8 \n\t" - // sc is now in q2, 8bpp - // Shift out, then spread alpha for q2 - "vmvn.u32 q3, q2 \n\t" - "vshr.u32 q3, q3, $0x18 \n\t" - "vmul.u32 q3, q6,q3 \n\t" - - // Multiply 'd' by sc.alpha (dsca) - "vmull.u8 q4, d6,d2 \n\t" - "vmull.u8 q5, d7,d3 \n\t" - - "vqrshrn.u16 d0, q4, #8 \n\t" - "vqrshrn.u16 d1, q5, #8 \n\t" - - "vqadd.u8 q1, q0, q2 \n\t" - - // Save dsc + sc - "vstm %[d]!, {d2,d3} \n\t" - - "cmp %[tmp], %[d] \n\t" - - "bhi "AP"quadloop \n\t" - - /* Trailing stuff */ - AP"loopout: \n\t" - - "cmp %[d], %[e] \n\t" - "beq "AP"done\n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - "sub %[tmp], %[e], #7 \n\t" - /* Dual loop */ - AP"dualloop2: \n\t" - "vldm %[s]!, {d0} \n\t" - "vldm %[d], {d2} \n\t" - // Mulitply s * c (= sc) - "vmull.u8 q4, d0,d14 \n\t" - // sc in d8 - "vqrshrn.u16 d4, q4, #8 \n\t" - - // sca in d9 - // XXX: I can probably squash one of these 3 - "vmvn.u32 d6, d4 \n\t" - "vshr.u32 d6, d6, #24 \n\t" - "vmul.u32 d6, d6, d12 \n\t" - - /* d * alpha */ - "vmull.u8 q4, d6, d2 \n\t" - "vqrshrn.u16 d0, q4, #8 \n\t" - - "vqadd.u8 d2, d0, d4 \n\t" - - // Save dsc + sc - "vstm %[d]!, {d2} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2 \n\t" - - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - - AP"singleloop2: \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - "vld1.32 d2[0], [%[d]] \n\t" - // Mulitply s * c (= sc) - "vmull.u8 q4, d0,d14 \n\t" - // sc in d8 - "vqrshrn.u16 d4, q4, #8 \n\t" - - // sca in d6 - "vmvn.u32 d6, d4 \n\t" - "vshr.u32 d6, d6, #24 \n\t" - "vmul.u32 d6, d12,d6 \n\t" - - /* d * alpha */ - "vmull.u8 q4, d6, d2 \n\t" - "vqrshrn.u16 d0, q4, #8 \n\t" - - "vqadd.u8 d2, d0, d4 \n\t" - - // Save dsc + sc - "vst1.32 d2[0], [%[d]]! \n\t" - - - AP"done:" - : // No output - // - : [s] "r" (s), [e] "r" (d + l), [d] "r" (d), [c] "r" (c), - [tmp] "r" (12) - : "q0","q1","q2","q3","q4","q5","q6","q7","memory" - ); -#undef AP -} - -static void -_op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d++ = 0xff000000 + MUL3_SYM(c, *s); - s++; - }); -} - -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 ( - ".fpu neon \n\t" - /* Set up 'c' */ - "vdup.u8 d14, %[c] \n\t" - "vmov.i8 d15, #1 \n\t" - "vaddl.u8 q15, d14, d15 \n\t" - "vshr.u8 q15,#1 \n\t" - - // Pick a loop - "andS %[tmp], %[d], $0xf \n\t" - "beq "AP"quadstart \n\t" - - "andS %[tmp], %[d], $0x4 \n\t" - "beq "AP"dualstart \n\t" - - AP"singleloop: \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - - // Long version of 'd' - "vmovl.u8 q8, d4 \n\t" - - // Long version of 's' - "vmovl.u8 q6, d0 \n\t" - - // d8 = s -d - "vsub.s16 d8, d12, d16 \n\t" - - // Multiply - "vmul.s16 d8, d8, d30 \n\t" - - // Shift down - "vshr.s16 d8, #7 \n\t" - - // Add 'd' - "vqadd.s16 d8, d8, d16 \n\t" - - // Shrink to save - "vqmovun.s16 d0, q4 \n\t" - "vst1.32 d0[0], [%[d]]! \n\t" - - // Now where? - "andS %[tmp], %[d], $0xf \n\t" - "beq "AP"quadstart \n\t" - - AP"dualstart: \n\t" - // Check we have enough - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #16 \n\t" - "blt "AP"loopout \n\t" - - AP"dualloop:" - "vldm %[d], {d4} \n\t" - "vldm %[s]!, {d0} \n\t" - - // Long version of d - "vmovl.u8 q8, d4 \n\t" - - // Long version of s - "vmovl.u8 q6, d0 \n\t" - - // q4/q5 = s-d - "vsub.s16 q4, q6, q8 \n\t" - - // Multiply - "vmul.s16 q4, q4,q15 \n\t" - - // Shift down - "vshr.s16 q4, #7 \n\t" - - // Add d - "vqadd.s16 q4, q4, q8 \n\t" - - // Shrink to save - "vqmovun.s16 d0, q4 \n\t" - - "vstm %[d]!, {d0} \n\t" - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #16 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp], %[e], #15 \n\t" - - AP"quadloop: \n\t" - // load 's' -> q0, 'd' -> q2 - "vldm %[d], {d4,d5} \n\t" - "vldm %[s]!, {d0,d1} \n\t" - - // Long version of d - "vmovl.u8 q8, d4 \n\t" - "vmovl.u8 q9, d5 \n\t" - - // Long version of s - "vmovl.u8 q6, d0 \n\t" - "vmovl.u8 q7, d1 \n\t" - - // q4/q5 = s-d - "vsub.s16 q4, q6, q8 \n\t" - "vsub.s16 q5, q7, q9 \n\t" - - // Multiply - "vmul.s16 q4, q4,q15 \n\t" - "vmul.s16 q5, q5,q15 \n\t" - - // Shift down - "vshr.s16 q4, #7 \n\t" - "vshr.s16 q5, #7 \n\t" - - // Add d - "vqadd.s16 q4, q4, q8 \n\t" - "vqadd.s16 q5, q5, q9 \n\t" - - // Shrink to save - "vqmovun.s16 d0, q4 \n\t" - "vqmovun.s16 d1, q5 \n\t" - "vstm %[d]!, {d0,d1} \n\t" - "cmp %[tmp], %[d] \n\t" - - "bhi "AP"quadloop\n\t" - - - "b "AP"done\n\t" - AP"loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done\n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - AP"dualloop2: \n\t" - "vldm %[d], {d4} \n\t" - "vldm %[s]!, {d0} \n\t" - - // Long version of d - "vmovl.u8 q8, d4 \n\t" - - // Long version of s - "vmovl.u8 q6, d0 \n\t" - - // q4/q5 = s-d - "vsub.s16 q4, q6, q8 \n\t" - - // Multiply - "vmul.s16 q4, q4,q15 \n\t" - - // Shift down - "vshr.s16 q4, #7 \n\t" - - // Add d - "vqadd.s16 q4, q4, q8 \n\t" - - // Shrink to save - "vqmovun.s16 d0, q4 \n\t" - - "vstm %[d]!, {d0} \n\t" - - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - - AP"singleloop2: \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - - // Long version of 'd' - "vmovl.u8 q8, d4 \n\t" - - // Long version of 's' - "vmovl.u8 q6, d0 \n\t" - - // d8 = s -d - "vsub.s16 d8, d12, d16 \n\t" - - // Multiply - "vmul.s16 d8, d8, d30 \n\t" - - // Shift down - "vshr.s16 d8, #7 \n\t" - - // Add 'd' - "vqadd.s16 d8, d8, d16 \n\t" - - // Shrink to save - "vqmovun.s16 d0, q4 \n\t" - - "vst1.32 d0[0], [%[d]] \n\t" - - - AP"done: \n\t" - - // No output - : - // Input - : [s] "r" (s), [d] "r" (d), [e] "r" (e), [c] "r" (c), [tmp] "r" (tmp) - // Clobbered - : "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 -#define _op_blend_pan_c_dp_neon _op_blend_p_c_dp_neon -#define _op_blend_p_can_dp_neon _op_blend_p_c_dp_neon -#define _op_blend_pas_can_dp_neon _op_blend_p_c_dp_neon -#define _op_blend_p_caa_dp_neon _op_blend_p_c_dp_neon -#define _op_blend_pas_caa_dp_neon _op_blend_p_c_dp_neon - -#define _op_blend_p_c_dpan_neon _op_blend_p_c_dp_neon -#define _op_blend_pas_c_dpan_neon _op_blend_pas_c_dp_neon -#define _op_blend_pan_c_dpan_neon _op_blend_pan_c_dp_neon -#define _op_blend_p_can_dpan_neon _op_blend_p_can_dp_neon -#define _op_blend_pas_can_dpan_neon _op_blend_pas_can_dp_neon -#define _op_blend_pan_can_dpan_neon _op_blend_pan_can_dp_neon -#define _op_blend_p_caa_dpan_neon _op_blend_p_caa_dp_neon -#define _op_blend_pas_caa_dpan_neon _op_blend_pas_caa_dp_neon -#define _op_blend_pan_caa_dpan_neon _op_blend_pan_caa_dp_neon - - -static void -init_blend_pixel_color_span_funcs_neon(void) -{ - op_blend_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_p_c_dp_neon; - op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pas_c_dp_neon; - op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pan_c_dp_neon; - op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_p_can_dp_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pas_can_dp_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pan_can_dp_neon; - op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_p_caa_dp_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pas_caa_dp_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pan_caa_dp_neon; - - op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_p_c_dpan_neon; - op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pas_c_dpan_neon; - op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pan_c_dpan_neon; - op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_p_can_dpan_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pas_can_dpan_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pan_can_dpan_neon; - op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_p_caa_dpan_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pas_caa_dpan_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pan_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - -#define _op_blend_pt_pas_c_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_c_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_p_can_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pas_can_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_can_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_p_caa_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pas_caa_dp_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_caa_dp_neon _op_blend_pt_p_c_dp_neon - -#define _op_blend_pt_p_c_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pas_c_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_c_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_p_can_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pas_can_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_can_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_p_caa_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pas_caa_dpan_neon _op_blend_pt_p_c_dp_neon -#define _op_blend_pt_pan_caa_dpan_neon _op_blend_pt_p_c_dp_neon - -static void -init_blend_pixel_color_pt_funcs_neon(void) -{ - op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_p_c_dp_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pas_c_dp_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pan_c_dp_neon; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_p_can_dp_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pas_can_dp_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pan_can_dp_neon; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_p_caa_dp_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pas_caa_dp_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pan_caa_dp_neon; - - op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_p_c_dpan_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pas_c_dpan_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pan_c_dpan_neon; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_p_can_dpan_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pas_can_dpan_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pan_can_dpan_neon; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_p_caa_dpan_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pas_caa_dpan_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pan_caa_dpan_neon; -} -#endif - -/*-----*/ - -/* blend_rel pixel x color -> dst */ - -#ifdef BUILD_NEON - -#define _op_blend_rel_p_c_dpan_neon _op_blend_p_c_dpan_neon -#define _op_blend_rel_pas_c_dpan_neon _op_blend_pas_c_dpan_neon -#define _op_blend_rel_pan_c_dpan_neon _op_blend_pan_c_dpan_neon -#define _op_blend_rel_p_can_dpan_neon _op_blend_p_can_dpan_neon -#define _op_blend_rel_pas_can_dpan_neon _op_blend_pas_can_dpan_neon -#define _op_blend_rel_pan_can_dpan_neon _op_blend_pan_can_dpan_neon -#define _op_blend_rel_p_caa_dpan_neon _op_blend_p_caa_dpan_neon -#define _op_blend_rel_pas_caa_dpan_neon _op_blend_pas_caa_dpan_neon -#define _op_blend_rel_pan_caa_dpan_neon _op_blend_pan_caa_dpan_neon - -static void -init_blend_rel_pixel_color_span_funcs_neon(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_p_c_dpan_neon; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pas_c_dpan_neon; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pan_c_dpan_neon; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_p_can_dpan_neon; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pas_can_dpan_neon; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pan_can_dpan_neon; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_p_caa_dpan_neon; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pas_caa_dpan_neon; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pan_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON - -#define _op_blend_rel_pt_p_c_dpan_neon _op_blend_pt_p_c_dpan_neon -#define _op_blend_rel_pt_pas_c_dpan_neon _op_blend_pt_pas_c_dpan_neon -#define _op_blend_rel_pt_pan_c_dpan_neon _op_blend_pt_pan_c_dpan_neon -#define _op_blend_rel_pt_p_can_dpan_neon _op_blend_pt_p_can_dpan_neon -#define _op_blend_rel_pt_pas_can_dpan_neon _op_blend_pt_pas_can_dpan_neon -#define _op_blend_rel_pt_pan_can_dpan_neon _op_blend_pt_pan_can_dpan_neon -#define _op_blend_rel_pt_p_caa_dpan_neon _op_blend_pt_p_caa_dpan_neon -#define _op_blend_rel_pt_pas_caa_dpan_neon _op_blend_pt_pas_caa_dpan_neon -#define _op_blend_rel_pt_pan_caa_dpan_neon _op_blend_pt_pan_caa_dpan_neon - -static void -init_blend_rel_pixel_color_pt_funcs_neon(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_c_dpan_neon; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_c_dpan_neon; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_c_dpan_neon; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_can_dpan_neon; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_can_dpan_neon; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_can_dpan_neon; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_caa_dpan_neon; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_caa_dpan_neon; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c deleted file mode 100644 index 4ee31f5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c +++ /dev/null @@ -1,543 +0,0 @@ -/* blend pixel x color --> dst */ - -#ifdef BUILD_SSE3 - -static void -_op_blend_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - DATA32 alpha; - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - DATA32 sc = MUL4_SYM(c, *s); - alpha = 256 - (sc >> 24); - *d = sc + MUL_256(alpha, *d); - d++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i sc0 = mul4_sym_sse3(c_packed, s0); - __m128i a0 = sub4_alpha_sse3(sc0); - __m128i mul0 = mul_256_sse3(a0, d0); - - d0 = _mm_add_epi32(sc0, mul0); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i sc0 = mul4_sym_sse3(c_packed, s0); - __m128i sc1 = mul4_sym_sse3(c_packed, s1); - - __m128i a0 = sub4_alpha_sse3(sc0); - __m128i a1 = sub4_alpha_sse3(sc1); - - __m128i mul0 = mul_256_sse3(a0, d0); - __m128i mul1 = mul_256_sse3(a1, d1); - - d0 = _mm_add_epi32(sc0, mul0); - d1 = _mm_add_epi32(sc1, mul1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_pan_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - DATA32 c_a = c & 0xFF000000; - DATA32 alpha = 256 - (c >> 24); - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - const __m128i c_alpha = _mm_set_epi32(c_a, c_a, c_a, c_a); - const __m128i a0 = _mm_set_epi32(alpha, alpha, alpha, alpha); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); - d++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), - mul_256_sse3(a0, d0)); - - r0 = _mm_add_epi32(r0, c_alpha); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), - mul_256_sse3(a0, d0)); - - __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), - mul_256_sse3(a0, d1)); - - r0 = _mm_add_epi32(r0, c_alpha); - r1 = _mm_add_epi32(r1, c_alpha); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_p_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - int alpha; - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - alpha = 256 - (*s >> 24); - *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); - d++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i a0 = sub4_alpha_sse3(s0); - - __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), - mul_256_sse3(a0, d0)); - - r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i a1 = sub4_alpha_sse3(s1); - - __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), - mul_256_sse3(a0, d0)); - - __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), - mul_256_sse3(a1, d1)); - - r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); - r1 = _mm_add_epi32(r1, _mm_and_si128(s1, A_MASK_SSE3)); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_pan_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - *d++ = 0xff000000 + MUL3_SYM(c, *s); - s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - - __m128i r0 = mul3_sym_sse3(c_packed, s0); - r0 = _mm_add_epi32(r0, A_MASK_SSE3); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - - __m128i r0 = mul3_sym_sse3(c_packed, s0); - __m128i r1 = mul3_sym_sse3(c_packed, s1); - - r0 = _mm_add_epi32(r0, A_MASK_SSE3); - r1 = _mm_add_epi32(r1, A_MASK_SSE3); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_p_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - int alpha; - c = 1 + (c & 0xff); - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - DATA32 sc = MUL_256(c, *s); - alpha = 256 - (sc >> 24); - *d = sc + MUL_256(alpha, *d); - d++; - s++; - l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128 ((__m128i *)d); - - __m128i sc0 = mul_256_sse3(c_packed, s0); - __m128i a0 = sub4_alpha_sse3(sc0); - - __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i sc0 = mul_256_sse3(c_packed, s0); - __m128i sc1 = mul_256_sse3(c_packed, s1); - - __m128i a0 = sub4_alpha_sse3(sc0); - __m128i a1 = sub4_alpha_sse3(sc1); - - __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); - __m128i r1 = _mm_add_epi32(mul_256_sse3(a1, d1), sc1); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_pan_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - c = 1 + (c & 0xff); - const __m128i c_packed = _mm_set_epi32(c, c, c,c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - *d = INTERP_256(c, *s, *d); - d++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i r0 = interp4_256_sse3(c_packed, s0, d0); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i r0 = interp4_256_sse3(c_packed, s0, d0); - __m128i r1 = interp4_256_sse3(c_packed, s1, d1); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -#define _op_blend_pas_c_dp_sse3 _op_blend_p_c_dp_sse3 -#define _op_blend_pas_can_dp_sse3 _op_blend_p_can_dp_sse3 -#define _op_blend_pas_caa_dp_sse3 _op_blend_p_caa_dp_sse3 - -#define _op_blend_p_c_dpan_sse3 _op_blend_p_c_dp_sse3 -#define _op_blend_pas_c_dpan_sse3 _op_blend_pas_c_dp_sse3 -#define _op_blend_pan_c_dpan_sse3 _op_blend_pan_c_dp_sse3 -#define _op_blend_p_can_dpan_sse3 _op_blend_p_can_dp_sse3 -#define _op_blend_pas_can_dpan_sse3 _op_blend_pas_can_dp_sse3 -#define _op_blend_pan_can_dpan_sse3 _op_blend_pan_can_dp_sse3 -#define _op_blend_p_caa_dpan_sse3 _op_blend_p_caa_dp_sse3 -#define _op_blend_pas_caa_dpan_sse3 _op_blend_pas_caa_dp_sse3 -#define _op_blend_pan_caa_dpan_sse3 _op_blend_pan_caa_dp_sse3 - -static void -init_blend_pixel_color_span_funcs_sse3(void) -{ - op_blend_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_p_c_dp_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pas_c_dp_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pan_c_dp_sse3; - op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_p_can_dp_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pas_can_dp_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pan_can_dp_sse3; - op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_p_caa_dp_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pas_caa_dp_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pan_caa_dp_sse3; - - op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_p_c_dpan_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pas_c_dpan_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pan_c_dpan_sse3; - op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_p_can_dpan_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pas_can_dpan_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pan_can_dpan_sse3; - op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_p_caa_dpan_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pas_caa_dpan_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pan_caa_dpan_sse3; -} - -#define _op_blend_pt_p_c_dp_sse3 NULL - -#define _op_blend_pt_pas_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pan_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_p_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pas_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pan_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_p_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pas_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pan_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 - -#define _op_blend_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dp_sse3 -#define _op_blend_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dp_sse3 -#define _op_blend_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dp_sse3 -#define _op_blend_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dp_sse3 -#define _op_blend_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dp_sse3 -#define _op_blend_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dp_sse3 -#define _op_blend_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dp_sse3 -#define _op_blend_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dp_sse3 -#define _op_blend_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dp_sse3 - -static void -init_blend_pixel_color_pt_funcs_sse3(void) -{ - op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_p_c_dp_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pas_c_dp_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pan_c_dp_sse3; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_p_can_dp_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pas_can_dp_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pan_can_dp_sse3; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_p_caa_dp_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pas_caa_dp_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pan_caa_dp_sse3; - - op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_p_c_dpan_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pas_c_dpan_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pan_c_dpan_sse3; - op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_p_can_dpan_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pas_can_dpan_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pan_can_dpan_sse3; - op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_p_caa_dpan_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pas_caa_dpan_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pan_caa_dpan_sse3; -} - -/*-----*/ - -/* blend_rel pixel x color -> dst */ - -static void -_op_blend_rel_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - int alpha; - - const __m128i c_packed = _mm_set_epi32(c, c, c, c); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - DATA32 sc = MUL4_SYM(c, *s); - alpha = 256 - (sc >> 24); - *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); - d++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i sc0 = mul4_sym_sse3(c_packed, s0); - __m128i a0 = sub4_alpha_sse3(sc0); - - __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); - __m128i r0 = mul_256_sse3(a0, d0); - - r0 = _mm_add_epi32(l0, r0); - - _mm_store_si128((__m128i *)d, r0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i sc0 = mul4_sym_sse3(c_packed, s0); - __m128i sc1 = mul4_sym_sse3(c_packed, s1); - - __m128i a0 = sub4_alpha_sse3(sc0); - __m128i a1 = sub4_alpha_sse3(sc1); - - __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); - __m128i r0 = mul_256_sse3(a0, d0); - - __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), sc1); - __m128i r1 = mul_256_sse3(a1, d1); - - r0 = _mm_add_epi32(l0, r0); - r1 = _mm_add_epi32(l1, r1); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - d += 8; s += 8; l -= 8; - }) -} - -#define _op_blend_rel_pas_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_pan_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_p_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_pas_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_pan_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_p_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_pas_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 -#define _op_blend_rel_pan_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 - -#define _op_blend_rel_p_c_dpan_sse3 _op_blend_p_c_dpan_sse3 -#define _op_blend_rel_pas_c_dpan_sse3 _op_blend_pas_c_dpan_sse3 -#define _op_blend_rel_pan_c_dpan_sse3 _op_blend_pan_c_dpan_sse3 -#define _op_blend_rel_p_can_dpan_sse3 _op_blend_p_can_dpan_sse3 -#define _op_blend_rel_pas_can_dpan_sse3 _op_blend_pas_can_dpan_sse3 -#define _op_blend_rel_pan_can_dpan_sse3 _op_blend_pan_can_dpan_sse3 -#define _op_blend_rel_p_caa_dpan_sse3 _op_blend_p_caa_dpan_sse3 -#define _op_blend_rel_pas_caa_dpan_sse3 _op_blend_pas_caa_dpan_sse3 -#define _op_blend_rel_pan_caa_dpan_sse3 _op_blend_pan_caa_dpan_sse3 - -static void -init_blend_rel_pixel_color_span_funcs_sse3(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_p_c_dp_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pas_c_dp_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pan_c_dp_sse3; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_p_can_dp_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pas_can_dp_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pan_can_dp_sse3; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_p_caa_dp_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pas_caa_dp_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pan_caa_dp_sse3; - - op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_p_c_dpan_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pas_c_dpan_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pan_c_dpan_sse3; - op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_p_can_dpan_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pas_can_dpan_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pan_can_dpan_sse3; - op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_p_caa_dpan_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pas_caa_dpan_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pan_caa_dpan_sse3; -} - -#define _op_blend_rel_pt_p_c_dp_sse3 NULL - -#define _op_blend_rel_pt_pas_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_pan_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_p_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_pas_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_pan_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_p_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_pas_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 -#define _op_blend_rel_pt_pan_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 - -#define _op_blend_rel_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dpan_sse3 -#define _op_blend_rel_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dpan_sse3 -#define _op_blend_rel_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dpan_sse3 -#define _op_blend_rel_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dpan_sse3 -#define _op_blend_rel_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dpan_sse3 -#define _op_blend_rel_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dpan_sse3 -#define _op_blend_rel_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dpan_sse3 -#define _op_blend_rel_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dpan_sse3 -#define _op_blend_rel_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dpan_sse3 - -static void -init_blend_rel_pixel_color_pt_funcs_sse3(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_p_c_dp_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pas_c_dp_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pan_c_dp_sse3; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_p_can_dp_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pas_can_dp_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pan_can_dp_sse3; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_p_caa_dp_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dp_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dp_sse3; - - op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_c_dpan_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_c_dpan_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_c_dpan_sse3; - op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_can_dpan_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_can_dpan_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_can_dpan_sse3; - op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_caa_dpan_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dpan_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dpan_sse3; -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c deleted file mode 100644 index 9b5abe6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c +++ /dev/null @@ -1,217 +0,0 @@ -/* blend pixel --> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - while (d < e) - { - MOV_P2R(*s, mm2, mm0) - MOV_RA2R(mm2, mm1) - movq_r2r(mm6, mm3); - psubw_r2r(mm1, mm3); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -static void -_op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - _op_blend_p_dp_mmx(s, m, c, d, l); - return; - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - while (d < e) - { - switch (*s & 0xff000000) - { - case 0: - break; - case 0xff000000: - *d = *s; - break; - default : - MOV_P2R(*s, mm2, mm0) - MOV_RA2R(mm2, mm1) - movq_r2r(mm6, mm3); - psubw_r2r(mm1, mm3); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - break; - } - s++; d++; - } -} - -#define _op_blend_pan_dp_mmx NULL - -#define _op_blend_p_dpan_mmx _op_blend_p_dp_mmx -#define _op_blend_pas_dpan_mmx _op_blend_pas_dp_mmx -#define _op_blend_pan_dpan_mmx _op_blend_pan_dp_mmx - -static void -init_blend_pixel_span_funcs_mmx(void) -{ - op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_p_dp_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pas_dp_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pan_dp_mmx; - - op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_p_dpan_mmx; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_dpan_mmx; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_P2R(s, mm2, mm0) - MOV_RA2R(mm2, mm1) - movq_r2r(mm6, mm3); - psubw_r2r(mm1, mm3); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_blend_pt_pan_dp_mmx NULL -#define _op_blend_pt_pas_dp_mmx _op_blend_pt_p_dp_mmx - -#define _op_blend_pt_p_dpan_mmx _op_blend_pt_p_dp_mmx -#define _op_blend_pt_pan_dpan_mmx _op_blend_pt_pan_dp_mmx -#define _op_blend_pt_pas_dpan_mmx _op_blend_pt_pas_dp_mmx - -static void -init_blend_pixel_pt_funcs_mmx(void) -{ - op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_p_dp_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_dp_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_dp_mmx; - - op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_dpan_mmx; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_dpan_mmx; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_dpan_mmx; -} -#endif - -/*-----*/ - -/* blend_rel pixel -> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - while (d < e) - { - MOV_P2R(*s, mm2, mm0) - MOV_RA2R(mm2, mm1) - movq_r2r(mm6, mm3); - psubw_r2r(mm1, mm3); - - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm3, mm1) - - MUL4_SYM_R2R(mm4, mm2, mm5) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -static void -_op_blend_rel_pan_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - while (d < e) - { - MOV_P2R(*s, mm2, mm0) - MOV_PA2R(*d, mm1) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -#define _op_blend_rel_pas_dp_mmx _op_blend_rel_p_dp_mmx - -#define _op_blend_rel_p_dpan_mmx _op_blend_p_dpan_mmx -#define _op_blend_rel_pan_dpan_mmx _op_blend_pan_dpan_mmx -#define _op_blend_rel_pas_dpan_mmx _op_blend_pas_dpan_mmx - -static void -init_blend_rel_pixel_span_funcs_mmx(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_p_dp_mmx; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pas_dp_mmx; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pan_dp_mmx; - - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_dpan_mmx; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_dpan_mmx; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_A2R(ALPHA_255, mm5) - - MOV_P2R(s, mm2, mm0) - MOV_RA2R(mm2, mm1) - psubw_r2r(mm1, mm6); - - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm6, mm1) - - MUL4_SYM_R2R(mm4, mm2, mm5) - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_rel_pt_pas_dp_mmx _op_blend_rel_pt_p_dp_mmx -#define _op_blend_rel_pt_pan_dp_mmx _op_blend_rel_pt_p_dp_mmx - -#define _op_blend_rel_pt_p_dpan_mmx _op_blend_pt_p_dpan_mmx -#define _op_blend_rel_pt_pas_dpan_mmx _op_blend_pt_pas_dpan_mmx -#define _op_blend_rel_pt_pan_dpan_mmx _op_blend_pt_pan_dpan_mmx - -static void -init_blend_rel_pixel_pt_funcs_mmx(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_p_dp_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pas_dp_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pan_dp_mmx; - - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_dpan_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_dpan_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c deleted file mode 100644 index a9d0f4b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c +++ /dev/null @@ -1,189 +0,0 @@ -/* blend pixel x mask --> dst */ - -#ifdef BUILD_C -static void -_op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - alpha = 256 - (*s >> 24); - *d = *s + MUL_256(alpha, *d); - break; - default: - c = MUL_SYM(alpha, *s); - alpha = 256 - (c >> 24); - *d = c + MUL_256(alpha, *d); - break; - } - m++; s++; d++; - }); -} - -static void -_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - alpha++; - *d = INTERP_256(alpha, *s, *d); - break; - } - m++; s++; d++; - }); -} - -static void -_op_blend_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - alpha++; - *d = INTERP_256(alpha, *s, *d); - break; - } - m++; s++; d++; - }); -} - - -#define _op_blend_p_mas_dpan _op_blend_p_mas_dp -#define _op_blend_pas_mas_dpan _op_blend_pas_mas_dp -#define _op_blend_pan_mas_dpan _op_blend_pan_mas_dp - -static void -init_blend_pixel_mask_span_funcs_c(void) -{ - op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_p_mas_dp; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pas_mas_dp; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pan_mas_dp; - - op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_p_mas_dpan; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pas_mas_dpan; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pan_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, s); - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - -static void -_op_blend_pt_pan_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { - *d = INTERP_256(m + 1, s, *d); -} - -#define _op_blend_pt_pas_mas_dp _op_blend_pt_p_mas_dp - -#define _op_blend_pt_p_mas_dpan _op_blend_pt_p_mas_dp -#define _op_blend_pt_pas_mas_dpan _op_blend_pt_pas_mas_dp -#define _op_blend_pt_pan_mas_dpan _op_blend_pt_pan_mas_dp - -static void -init_blend_pixel_mask_pt_funcs_c(void) -{ - op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_p_mas_dp; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pas_mas_dp; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pan_mas_dp; - - op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_mas_dpan; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_mas_dpan; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_mas_dpan; -} -#endif - -/*-----*/ - -/* blend_rel pixel x mask -> dst */ - -#ifdef BUILD_C -static void -_op_blend_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - c = MUL_SYM(*m, *s); - alpha = 256 - (c >> 24); - *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); - d++; m++; s++; - }); -} - -#define _op_blend_rel_pas_mas_dp _op_blend_rel_p_mas_dp -#define _op_blend_rel_pan_mas_dp _op_blend_rel_p_mas_dp - -#define _op_blend_rel_p_mas_dpan _op_blend_p_mas_dpan -#define _op_blend_rel_pas_mas_dpan _op_blend_pas_mas_dpan -#define _op_blend_rel_pan_mas_dpan _op_blend_pan_mas_dpan - -static void -init_blend_rel_pixel_mask_span_funcs_c(void) -{ - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_p_mas_dp; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pas_mas_dp; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pan_mas_dp; - - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_mas_dpan; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_mas_dpan; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_blend_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, s); - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -#define _op_blend_rel_pt_pas_mas_dp _op_blend_rel_pt_p_mas_dp -#define _op_blend_rel_pt_pan_mas_dp _op_blend_rel_pt_p_mas_dp - -#define _op_blend_rel_pt_p_mas_dpan _op_blend_pt_p_mas_dpan -#define _op_blend_rel_pt_pas_mas_dpan _op_blend_pt_pas_mas_dpan -#define _op_blend_rel_pt_pan_mas_dpan _op_blend_pt_pan_mas_dpan - -static void -init_blend_rel_pixel_mask_pt_funcs_c(void) -{ - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_mas_dp; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_mas_dp; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_mas_dp; - - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_mas_dpan; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_mas_dpan; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_mas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c deleted file mode 100644 index 4fa50a9..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c +++ /dev/null @@ -1,157 +0,0 @@ -/* blend pixel x mask --> dst */ - -#ifdef BUILD_MMX -static void -_op_blend_pas_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - while (d < e) { - l = (*s >> 24); - switch(*m & l) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - l = 1 + *m; - MOV_A2R(l, mm3) - MOV_P2R(*s, mm2, mm0) - MUL4_256_R2R(mm3, mm2) - - MOV_RA2R(mm2, mm1) - movq_r2r(mm6, mm3); - psubw_r2r(mm1, mm3); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) - break; - } - m++; s++; d++; - } -} - -static void -_op_blend_pan_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - l++; - MOV_A2R(l, mm3) - MOV_P2R(*s, mm2, mm0) - MOV_P2R(*d, mm1, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - m++; s++; d++; - } -} - -#define _op_blend_p_mas_dp_mmx _op_blend_pas_mas_dp_mmx - -#define _op_blend_p_mas_dpan_mmx _op_blend_p_mas_dp_mmx -#define _op_blend_pan_mas_dpan_mmx _op_blend_pan_mas_dp_mmx -#define _op_blend_pas_mas_dpan_mmx _op_blend_pas_mas_dp_mmx - -static void -init_blend_pixel_mask_span_funcs_mmx(void) -{ - op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_p_mas_dp_mmx; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pas_mas_dp_mmx; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pan_mas_dp_mmx; - - op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_p_mas_dpan_mmx; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_mas_dpan_mmx; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_mas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_blend_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = m + 1; - MOV_A2R(c, mm3) - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_256, mm6) - MOV_P2R(s, mm2, mm0) - MUL4_256_R2R(mm3, mm2) - - MOV_RA2R(mm2, mm1) - psubw_r2r(mm1, mm6); - - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm6, mm1) - - paddw_r2r(mm2, mm1); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_blend_pt_pan_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx -#define _op_blend_pt_pas_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx - -#define _op_blend_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dp_mmx -#define _op_blend_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dp_mmx -#define _op_blend_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dp_mmx - -static void -init_blend_pixel_mask_pt_funcs_mmx(void) -{ - op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_p_mas_dp_mmx; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_mas_dp_mmx; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_mas_dp_mmx; - - op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_mas_dpan_mmx; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_mas_dpan_mmx; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_mas_dpan_mmx; -} -#endif - -/*-----*/ - -/* blend_rel pixel x mask -> dst */ - -#ifdef BUILD_MMX - -#define _op_blend_rel_p_mas_dpan_mmx _op_blend_p_mas_dpan_mmx -#define _op_blend_rel_pas_mas_dpan_mmx _op_blend_pas_mas_dpan_mmx -#define _op_blend_rel_pan_mas_dpan_mmx _op_blend_pan_mas_dpan_mmx - -static void -init_blend_rel_pixel_mask_span_funcs_mmx(void) -{ - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_mas_dpan_mmx; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_mas_dpan_mmx; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_mas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX - -#define _op_blend_rel_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dpan_mmx -#define _op_blend_rel_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dpan_mmx -#define _op_blend_rel_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dpan_mmx - -static void -init_blend_rel_pixel_mask_pt_funcs_mmx(void) -{ - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_mas_dpan_mmx; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_mas_dpan_mmx; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_mas_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c deleted file mode 100644 index b252a67..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c +++ /dev/null @@ -1,129 +0,0 @@ -/* blend pixel x mask --> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - alpha++; - *d = INTERP_256(alpha, *s, *d); - break; - } - m++; s++; d++; - }); -} - -static void -_op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int alpha; - UNROLL8_PLD_WHILE(d, l, e, - { - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - alpha++; - *d = INTERP_256(alpha, *s, *d); - break; - } - m++; s++; d++; - }); -} - -#define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon - -#define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon -#define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon -#define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon - -static void -init_blend_pixel_mask_span_funcs_neon(void) -{ - op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon; - - op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = MUL_SYM(m, s); - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - -#define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon -#define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon - -#define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon -#define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon -#define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon - -static void -init_blend_pixel_mask_pt_funcs_neon(void) -{ - op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon; - - op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon; -} -#endif - -/*-----*/ - -/* blend_rel pixel x mask -> dst */ - -#ifdef BUILD_NEON - -#define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon -#define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon -#define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon - -static void -init_blend_rel_pixel_mask_span_funcs_neon(void) -{ - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON - -#define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon -#define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon -#define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon - -static void -init_blend_rel_pixel_mask_pt_funcs_neon(void) -{ - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c deleted file mode 100644 index 617b9e2..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c +++ /dev/null @@ -1,300 +0,0 @@ -/* blend pixel x mask --> dst */ - -#ifdef BUILD_SSE3 - -static void -_op_blend_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - - int alpha; - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - alpha = *m; - c = MUL_SYM(alpha, *s); - alpha = 256 - (c >> 24); - *d = c + MUL_256(alpha, *d); - m++; s++; d++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - - __m128i c0 = mul_sym_sse3(m0, s0); - __m128i a0 = sub4_alpha_sse3(c0); - __m128i r0 = mul_256_sse3(a0, d0); - - r0 = _mm_add_epi32(r0, c0); - - _mm_store_si128((__m128i *)d, r0); - - m += 4; s += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - - __m128i c0 = mul_sym_sse3(m0, s0); - __m128i c1 = mul_sym_sse3(m1, s1); - - __m128i a0 = sub4_alpha_sse3(c0); - __m128i a1 = sub4_alpha_sse3(c1); - - __m128i r0 = mul_256_sse3(a0, d0); - __m128i r1 = mul_256_sse3(a1, d1); - - r0 = _mm_add_epi32(r0, c0); - r1 = _mm_add_epi32(r1, c1); - - _mm_store_si128((__m128i *)d, r0); - _mm_store_si128((__m128i *)(d+4), r1); - - m += 8; s += 8; d += 8; l -= 8; - }) -} - -static void -_op_blend_pas_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - - const __m128i ones = _mm_set_epi32(1, 1, 1, 1); - int alpha; - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - alpha = *m; - switch(alpha) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - alpha++; - *d = INTERP_256(alpha, *s, *d); - break; - } - m++; s++; d++; l--; - }, - { /*A4OP */ - - if ((m[3] | m[2] | m[1] | m[0]) == 0) { - m += 4; s += 4; d += 4; l -= 4; - continue; - } - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - - __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); - - m0 = _mm_add_epi32(m0, ones); - - __m128i r0 = interp4_256_sse3(m0, s0, d0); - - r0 = _mm_and_si128(~zm0, r0); - d0 = _mm_and_si128(zm0, d0); - - d0 = _mm_add_epi32(r0, d0); - - _mm_store_si128((__m128i *)d, d0); - - m += 4; s += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { - m += 8; s += 8; d += 8; l -= 8; - continue; - } - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - - __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); - __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); - - m0 = _mm_add_epi32(m0, ones); - m1 = _mm_add_epi32(m1, ones); - - __m128i r0 = interp4_256_sse3(m0, s0, d0); - __m128i r1 = interp4_256_sse3(m1, s1, d1); - - r0 = _mm_and_si128(~zm0, r0); - d0 = _mm_and_si128(zm0, d0); - - r1 = _mm_and_si128(~zm1, r1); - d1 = _mm_and_si128(zm1, d1); - - d0 = _mm_add_epi32(d0, r0); - d1 = _mm_add_epi32(d1, r1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - m += 8; s += 8; d += 8; l -= 8; - }) -} - -#define _op_blend_pan_mas_dp_sse3 _op_blend_pas_mas_dp_sse3 - -#define _op_blend_p_mas_dpan_sse3 _op_blend_p_mas_dp_sse3 -#define _op_blend_pas_mas_dpan_sse3 _op_blend_pas_mas_dp_sse3 -#define _op_blend_pan_mas_dpan_sse3 _op_blend_pan_mas_dp_sse3 - -static void -init_blend_pixel_mask_span_funcs_sse3(void) -{ - op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_p_mas_dp_sse3; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pas_mas_dp_sse3; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pan_mas_dp_sse3; - - op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_mas_dpan_sse3; - op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_mas_dpan_sse3; - op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_mas_dpan_sse3; -} - -#define _op_blend_pt_p_mas_dp_sse3 NULL -#define _op_blend_pt_pan_mas_dp_sse3 NULL - -#define _op_blend_pt_pas_mas_dp_sse3 _op_blend_pt_p_mas_dp_sse3 - -#define _op_blend_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dp_sse3 -#define _op_blend_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dp_sse3 -#define _op_blend_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dp_sse3 - -static void -init_blend_pixel_mask_pt_funcs_sse3(void) -{ - op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_mas_dp_sse3; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_mas_dp_sse3; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_mas_dp_sse3; - - op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_mas_dpan_sse3; - op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_mas_dpan_sse3; - op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_mas_dpan_sse3; -} - -/*-----*/ - -/* blend_rel pixel x mask -> dst */ - -static void -_op_blend_rel_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - - int alpha; - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - c = MUL_SYM(*m, *s); - alpha = 256 - (c >> 24); - *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); - d++; m++; s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i c0 = mul_sym_sse3(m0, s0); - __m128i a0 = sub4_alpha_sse3(c0); - - __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); - __m128i r0 = mul_256_sse3(a0, d0); - - d0 = _mm_add_epi32(l0, r0); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; m += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i c0 = mul_sym_sse3(m0, s0); - __m128i c1 = mul_sym_sse3(m1, s1); - - __m128i a0 = sub4_alpha_sse3(c0); - __m128i a1 = sub4_alpha_sse3(c1); - - __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); - __m128i r0 = mul_256_sse3(a0, d0); - - __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c1); - __m128i r1 = mul_256_sse3(a1, d1); - - d0 = _mm_add_epi32(l0, r0); - d1 = _mm_add_epi32(l1, r1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; m += 8; s += 8; l -= 8; - }) -} - -#define _op_blend_rel_pas_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 -#define _op_blend_rel_pan_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 - -#define _op_blend_rel_p_mas_dpan_sse3 _op_blend_p_mas_dpan_sse3 -#define _op_blend_rel_pas_mas_dpan_sse3 _op_blend_pas_mas_dpan_sse3 -#define _op_blend_rel_pan_mas_dpan_sse3 _op_blend_pan_mas_dpan_sse3 - -static void -init_blend_rel_pixel_mask_span_funcs_sse3(void) -{ - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_mas_dp_sse3; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_mas_dp_sse3; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_mas_dp_sse3; - - op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_mas_dpan_sse3; - op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_mas_dpan_sse3; - op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_mas_dpan_sse3; -} - -#define _op_blend_rel_pt_p_mas_dp_sse3 NULL - -#define _op_blend_rel_pt_pas_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 -#define _op_blend_rel_pt_pan_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 - -#define _op_blend_rel_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dpan_sse3 -#define _op_blend_rel_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dpan_sse3 -#define _op_blend_rel_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dpan_sse3 - -static void -init_blend_rel_pixel_mask_pt_funcs_sse3(void) -{ - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_mas_dp_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dp_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dp_sse3; - - op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_mas_dpan_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dpan_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dpan_sse3; -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c deleted file mode 100644 index 1cb50b6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c +++ /dev/null @@ -1,530 +0,0 @@ -/* blend pixel --> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { -#define AP "blend_p_dp_" - asm volatile ( - ".fpu neon \n\t" - //** init - "vmov.i8 q8, $0x1 \n\t" - - AP "loopchoose: \n\t" - // If aligned already - straight to octs - "andS %[tmp], %[d],$0x1f \n\t" - "beq "AP"octloops \n\t" - - "andS %[tmp], %[d],$0xf \n\t" - "beq "AP"quadloops \n\t" - - "andS %[tmp], %[d],$0x4 \n\t" - "beq "AP"dualloop \n\t" - - // Only ever executes once, fall through to dual - AP "singleloop: \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8, #24 \n\t" - - "vmul.u32 d8, d16, d8 \n\t" - - "vmull.u8 q6, d4,d8 \n\t" - "vqrshrn.u16 d8, q6, #8 \n\t" - // Add to 's' - "vqadd.u8 q2, q4,q0 \n\t" - - "vst1.32 d4[0], [%[d]] \n\t" - "add %[d], #4 \n\t" - - // Can we go the fast path? - "andS %[tmp], %[d],$0x1f \n\t" - "beq "AP"octloops \n\t" - - "andS %[tmp], %[d],$0x0f \n\t" - "beq "AP"quadloops \n\t" - - - AP "dualloop: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - AP "dualloopint: \n\t" - //** Dual Loop - "vldm %[s]!, {d0} \n\t" - "vldr d4, [%[d]] \n\t" - - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8, #24 \n\t" - - "vmul.u32 d8, d16, d8 \n\t" - - "vmull.u8 q6, d4,d8 \n\t" - "vqrshrn.u16 d8, q6, #8 \n\t" - // Add to 's' - "vqadd.u8 d4, d8,d0 \n\t" - "vstr d4, [%[d]] \n\t" - "add %[d], #8 \n\t" - - "ands %[tmp], %[d], $0x1f \n\t" - "beq "AP"octloops \n\t" - - AP"quadloops: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - "vldm %[s]!, {d0,d1) \n\t" - "vldm %[d], {d4,d5} \n\t" - - - // Copy s.a into q2 (>> 24) & subtract from 255 - "vmvn.u8 q4, q0 \n\t" - "vshr.u32 q4, q4,$0x18 \n\t" - - // Multiply into all fields - "vmul.u32 q4, q8,q4 \n\t" - - // a * d (clobbering 'd'/q7) - "vmull.u8 q6, d4,d8 \n\t" - "vmull.u8 q2, d5,d9 \n\t" - - // Shift & narrow it - "vqrshrn.u16 d8, q6, #8 \n\t" - "vqrshrn.u16 d9, q2, #8 \n\t" - - // Add to s - "vqadd.u8 q2, q4,q0 \n\t" - - // Write it - "vstm %[d]!, {d4,d5} \n\t" - - AP "octloops: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "ble "AP"loopout \n\t" - - "sub %[tmp],%[e],#64 \n\t" - - - AP "octloopint:\n\t" - //** Oct loop - "vldm %[s]!, {d0,d1,d2,d3) \n\t" - "vldm %[d], {d4,d5,d6,d7} \n\t" - "pld [%[s], #64] \n\t" - - - // Copy s.a into q2 (>> 24) & subtract from 255 - "vmvn.u8 q4, q0 \n\t" - "vmvn.u8 q5, q1 \n\t" - "vshr.u32 q4, q4,$0x18 \n\t" - "vshr.u32 q5, q5,$0x18\n\t" - - // Multiply into all fields - "vmul.u32 q4, q8,q4 \n\t" - "vmul.u32 q5, q8,q5 \n\t" - - - // a * d (clobbering 'd'/q7) - "vmull.u8 q6, d4,d8 \n\t" - "vmull.u8 q2, d5,d9 \n\t" - "vmull.u8 q7, d6,d10 \n\t" - "vmull.u8 q3, d7,d11 \n\t" - - "cmp %[tmp], %[d]\n\t" - - // Shift & narrow it - "vqrshrn.u16 d8, q6, #8 \n\t" - "vqrshrn.u16 d9, q2, #8 \n\t" - "vqrshrn.u16 d10, q7, #8 \n\t" - "vqrshrn.u16 d11, q3, #8 \n\t" - - - // Add to s - "vqadd.u8 q2, q4,q0 \n\t" - "vqadd.u8 q3, q5,q1 \n\t" - - // Write it - "vstm %[d]!, {d4,d5,d6,d7} \n\t" - - "bhi "AP"octloopint\n\t" - - AP "loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "ble "AP"singleloop2 \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],$0x7 \n\t" - AP "dualloop2int: \n\t" - //** Trailing double - - "vldm %[s]!, {d0} \n\t" - "vldm %[d], {d4} \n\t" - - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8, #24 \n\t" - - "vmul.u32 d8, d16, d8 \n\t" - - "vmull.u8 q6, d4,d8 \n\t" - "vqrshrn.u16 d8, q6, #8 \n\t" - // Add to 's' - "vqadd.u8 d4, d8,d0 \n\t" - - "vstr.32 d4, [%[d]] \n\t" - "add %[d], #8 \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2int \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP"singleloop2: \n\t" - "vld1.32 d0[0], [%[s]] \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8, #24 \n\t" - - "vmul.u32 d8, d8, d16 \n\t" - - "vmull.u8 q6, d8,d4 \n\t" - "vqrshrn.u16 d8, q6, #8 \n\t" - // Add to 's' - "vqadd.u8 d0, d0,d8 \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - - //** Trailing single - - AP"done:\n\t" -//"sub %[tmp], %[e], #4 \n\t" -//"vmov.i32 d0, $0xffff0000 \n\t" -//"vst1.32 d0[0], [%[tmp]] \n\t" - - - : // output regs - // Input - : [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c), - [tmp] "r" (7) - : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered - ); -#undef AP - -} - -static void -_op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { -#define AP "blend_pas_dp_" - DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912; - asm volatile ( - ".fpu neon \n\t" - "vmov.i8 q8, #1 \n\t" - AP"loopchoose: \n\t" - // If aliged - go as fast we can - "andS %[tmp], %[d], #31 \n\t" - "beq "AP"quadstart \n\t" - - // See if we can at least do our double loop - "andS %[tmp], %[d], $0x7 \n\t" - "beq "AP"dualstart \n\t" - - // Ugly single word version - AP "singleloop: \n\t" - "vld1.32 d0[0], [%[s]]! \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - - "vmvn.u8 d8, d0 \n\t" - - "vshr.u32 d8, d8,$0x18 \n\t" - - // Mulitply into all fields - "vmul.u32 d8, d8, d16 \n\t" - - // Multiply out - "vmull.u8 q6, d8, d4 \n\t" - - "vqrshrn.u16 d8, q6, #8 \n\t" - - // Add to s - "vqadd.u8 d0, d0,d8 \n\t" - "vst1.32 d0[0], [%[d]]! \n\t" - - AP"dualstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - // If aligned - go as fast we can - "andS %[tmp], %[d], #31 \n\t" - "beq "AP"quadstart \n\t" - - - AP"dualloop: \n\t" - - "vldm %[s]!, {d0) \n\t" - "vldm %[d], {d4} \n\t" - - // Subtract from 255 (ie negate) and extract alpha channel - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8,$0x18 \n\t" - - // Mulitply into all fields - "vmul.u32 d8, d8, d16 \n\t" - - // Multiply out - "vmull.u8 q6, d8, d4 \n\t" - - "vqrshrn.u16 d8, q6, #8 \n\t" - - // Add to s - "vqadd.u8 d0, d0,d8 \n\t" - "vstm %[d]!, {d0} \n\t" - - "andS %[tmp], %[d], $0x1f \n\t" - "bne "AP"dualloop \n\t" - - - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - "sub %[tmp], %[e], #31 \n\t" - - AP"quadloop:\n\t" - "vldm %[s]!, {d0,d1,d2,d3) \n\t" - "vldm %[d], {d4,d5,d6,d7} \n\t" - - // Subtract from 255 (ie negate) and extract alpha channel - "vmvn.u8 q4, q0 \n\t" - "vmvn.u8 q5, q1 \n\t" - "vshr.u32 q4, q4,$0x18 \n\t" - "vshr.u32 q5, q5,$0x18 \n\t" - - // Prepare to preload - "add %[pl], %[s], #32 \n\t" - - // Mulitply into all fields - "vmul.u32 q4, q4, q8 \n\t" - "vmul.u32 q5, q5, q8 \n\t" - "pld [%[pl]] \n\t" - - // Multiply out - "vmull.u8 q6, d8, d4 \n\t" - "vmull.u8 q7, d10, d6 \n\t" - "vmull.u8 q2, d9, d5 \n\t" - "vmull.u8 q3, d11, d7 \n\t" - - "add %[pl], %[d], #32 \n\t" - - "vqrshrn.u16 d8, q6, #8 \n\t" - "vqrshrn.u16 d10, q7, #8 \n\t" - "vqrshrn.u16 d9, q2, #8 \n\t" - "vqrshrn.u16 d11, q3, #8 \n\t" - "pld [%[pl]] \n\t" - - "cmp %[tmp], %[pl] \n\t" - // Add to s - "vqadd.u8 q0, q0,q4 \n\t" - "vqadd.u8 q1, q1,q5 \n\t" - - "vstm %[d]!, {d0,d1,d2,d3} \n\t" - - "bhi "AP"quadloop \n\t" - - AP "loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - "sub %[tmp],%[e],$0x7 \n\t" - - AP"dualloop2: \n\t" - "vldm %[s]!, {d0) \n\t" - "vldm %[d], {d4} \n\t" - - // Subtract from 255 (ie negate) and extract alpha channel - "vmvn.u8 d8, d0 \n\t" - "vshr.u32 d8, d8,$0x18 \n\t" - - // Mulitply into all fields - "vmul.u32 d8, d8, d16 \n\t" - - // Multiply out - "vmull.u8 q6, d8, d4 \n\t" - - "vqrshrn.u16 d8, q6, #8 \n\t" - - // Add to s - "vqadd.u8 d0, d0,d8 \n\t" - - "vstm %[d]!, {d0} \n\t" - "cmp %[tmp], %[d] \n\t" - - "bhi "AP"dualloop2 \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP "singleloop2: \n\t" - "vld1.32 d0[0], [%[s]] \n\t" - "vld1.32 d4[0], [%[d]] \n\t" - - "vmvn.u8 d8, d0 \n\t" - - "vshr.u32 d8, d8,$0x18 \n\t" - - // Mulitply into all fields - "vmul.u32 d8, d8, d16 \n\t" - - // Multiply out - "vmull.u8 q6, d8, d4 \n\t" - - "vqrshrn.u16 d8, q6, #8 \n\t" - - // Add to s - "vqadd.u8 d0, d0,d8 \n\t" - - "vst1.32 d0[0], [%[d]] \n\t" - AP "done:\n\t" - - - : /* Out */ - : /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp), - [pl] "r" (pl) - : /* Clobbered */ - "q0","q1","q2","q3","q4","q5","q6","q7","q8","memory" - ); -#undef AP -} - -#define _op_blend_pan_dp_neon NULL - -#define _op_blend_p_dpan_neon _op_blend_p_dp_neon -#define _op_blend_pas_dpan_neon _op_blend_pas_dp_neon -#define _op_blend_pan_dpan_neon _op_blend_pan_dp_neon - -static void -init_blend_pixel_span_funcs_neon(void) -{ - op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_p_dp_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pas_dp_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pan_dp_neon; - - op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_p_dpan_neon; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_dpan_neon; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = 256 - (s >> 24); - *d = s + MUL_256(c, *d); -} - - -#define _op_blend_pt_pan_dp_neon NULL -#define _op_blend_pt_pas_dp_neon _op_blend_pt_p_dp_neon - -#define _op_blend_pt_p_dpan_neon _op_blend_pt_p_dp_neon -#define _op_blend_pt_pan_dpan_neon _op_blend_pt_pan_dp_neon -#define _op_blend_pt_pas_dpan_neon _op_blend_pt_pas_dp_neon - -static void -init_blend_pixel_pt_funcs_neon(void) -{ - op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_p_dp_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_dp_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_dp_neon; - - op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_dpan_neon; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_dpan_neon; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_dpan_neon; -} -#endif - -/*-----*/ - -/* blend_rel pixel -> dst */ - -#ifdef BUILD_NEON -static void -_op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) { - l = 256 - (*s >> 24); - c = 1 + (*d >> 24); - *d = MUL_256(c, *s) + MUL_256(l, *d); - d++; - s++; - } -} - -static void -_op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) { - c = 1 + (*d >> 24); - *d++ = MUL_256(c, *s); - s++; - } -} - -#define _op_blend_rel_pas_dp_neon _op_blend_rel_p_dp_neon - -#define _op_blend_rel_p_dpan_neon _op_blend_p_dpan_neon -#define _op_blend_rel_pan_dpan_neon _op_blend_pan_dpan_neon -#define _op_blend_rel_pas_dpan_neon _op_blend_pas_dpan_neon - -static void -init_blend_rel_pixel_span_funcs_neon(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_p_dp_neon; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pas_dp_neon; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pan_dp_neon; - - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_dpan_neon; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_dpan_neon; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_blend_rel_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = 256 - (s >> 24); - *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); -} - -#define _op_blend_rel_pt_pas_dp_neon _op_blend_rel_pt_p_dp_neon -#define _op_blend_rel_pt_pan_dp_neon _op_blend_rel_pt_p_dp_neon - -#define _op_blend_rel_pt_p_dpan_neon _op_blend_pt_p_dpan_neon -#define _op_blend_rel_pt_pas_dpan_neon _op_blend_pt_pas_dpan_neon -#define _op_blend_rel_pt_pan_dpan_neon _op_blend_pt_pan_dpan_neon - -static void -init_blend_rel_pixel_pt_funcs_neon(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_p_dp_neon; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pas_dp_neon; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pan_dp_neon; - - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_dpan_neon; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_dpan_neon; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c deleted file mode 100644 index 69c597c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c +++ /dev/null @@ -1,315 +0,0 @@ -/* blend pixel --> dst */ - -#ifdef BUILD_SSE3 - -static void -_op_blend_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - int alpha = 256 - (*s >> 24); - *d = *s + MUL_256(alpha, *d); - s++; d++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i mul0 = mul_256_sse3(a0, d0); - d0 = _mm_add_epi32(mul0, s0); - - _mm_store_si128((__m128i *)d, d0); - - s += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i a1 = sub4_alpha_sse3(s1); - - __m128i mul0 = mul_256_sse3(a0, d0); - __m128i mul1 = mul_256_sse3(a1, d1); - - d0 = _mm_add_epi32(mul0, s0); - d1 = _mm_add_epi32(mul1, s1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - s += 8; d += 8; l -= 8; - }) -} - -static void -_op_blend_pas_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - - int alpha; - - const __m128i zero = _mm_setzero_si128(); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - switch (*s & 0xff000000) - { - case 0: - break; - case 0xff000000: - *d = *s; - break; - default: - alpha = 256 - (*s >> 24); - *d = *s + MUL_256(alpha, *d); - break; - } - s++; d++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i mul0 = mul_256_sse3(a0, d0); - - mul0 = _mm_add_epi32(s0, mul0); - - __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); - __m128i imask0 = ~zmask0; - - mul0 = _mm_and_si128(imask0, mul0); - d0 = _mm_and_si128(zmask0, d0); - - d0 = _mm_add_epi32(mul0, d0); - - _mm_store_si128((__m128i *)d, d0); - - s += 4; d += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128((__m128i *)(d+4)); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i a1 = sub4_alpha_sse3(s1); - - __m128i mul0 = mul_256_sse3(a0, d0); - __m128i mul1 = mul_256_sse3(a1, d1); - - mul0 = _mm_add_epi32(s0, mul0); - mul1 = _mm_add_epi32(s1, mul1); - - __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); - __m128i zmask1 = _mm_cmpeq_epi32(_mm_srli_epi32(s1, 24), zero); - - __m128i imask0 = ~zmask0; - __m128i imask1 = ~zmask1; - - mul0 = _mm_and_si128(imask0, mul0); - d0 = _mm_and_si128(zmask0, d0); - - mul1 = _mm_and_si128(imask1, mul1); - d1 = _mm_and_si128(zmask1, d1); - - d0 = _mm_add_epi32(mul0, d0); - d1 = _mm_add_epi32(mul1, d1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - s += 8; d += 8; l -= 8; - }) -} - -#define _op_blend_pan_dp_sse3 NULL - -#define _op_blend_p_dpan_sse3 _op_blend_p_dp_sse3 -#define _op_blend_pas_dpan_sse3 _op_blend_pas_dp_sse3 -#define _op_blend_pan_dpan_sse3 _op_blend_pan_dp_sse3 - -static void -init_blend_pixel_span_funcs_sse3(void) -{ - op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_p_dp_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; - -// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) -// op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; - op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; - op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_dpan_sse3; -} - -#define _op_blend_pt_p_dp_sse3 NULL - -#define _op_blend_pt_pas_dp_sse3 _op_blend_pt_p_dp_sse3 -#define _op_blend_pt_pan_dp_sse3 NULL - -#define _op_blend_pt_p_dpan_sse3 _op_blend_pt_p_dp_sse3 -#define _op_blend_pt_pan_dpan_sse3 _op_blend_pt_pan_dp_sse3 -#define _op_blend_pt_pas_dpan_sse3 _op_blend_pt_pas_dp_sse3 - -static void -init_blend_pixel_pt_funcs_sse3(void) -{ - op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_dp_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_dp_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_dp_sse3; - - op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_dpan_sse3; - op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_dpan_sse3; - op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_dpan_sse3; -} - -/*-----*/ - -/* blend_rel pixel -> dst */ - -static void -_op_blend_rel_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - const __m128i ones = _mm_set_epi32(1, 1, 1, 1); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - int alpha = 256 - (*s >> 24); - c = 1 + (*d >> 24); - *d = MUL_256(c, *s) + MUL_256(alpha, *d); - d++; s++; l--; - }, - { /*A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); - __m128i a0 = sub4_alpha_sse3(s0); - - d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128 ((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); - - __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); - __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); - - __m128i a0 = sub4_alpha_sse3(s0); - __m128i a1 = sub4_alpha_sse3(s1); - - d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); - d1 = _mm_add_epi32(mul_256_sse3(c1, s1), mul_256_sse3(a1, d1)); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; s += 8; l -= 8; - }) -} - -static void -_op_blend_rel_pan_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - - const __m128i ones = _mm_set_epi32(1, 1, 1, 1); - - LOOP_ALIGNED_U1_A48_SSE3(d, l, - { /* UOP */ - - c = 1 + (*d >> 24); - *d++ = MUL_256(c, *s); - s++; l--; - }, - { /* A4OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128((__m128i *)d); - - __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); - d0 = mul_256_sse3(c0, s0); - - _mm_store_si128((__m128i *)d, d0); - - d += 4; s += 4; l -= 4; - }, - { /* A8OP */ - - __m128i s0 = _mm_lddqu_si128((__m128i *)s); - __m128i d0 = _mm_load_si128 ((__m128i *)d); - - __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); - __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); - - __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); - __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); - - d0 = mul_256_sse3(c0, s0); - d1 = mul_256_sse3(c1, s1); - - _mm_store_si128((__m128i *)d, d0); - _mm_store_si128((__m128i *)(d+4), d1); - - d += 8; s += 8; l -= 8; - }) -} - -#define _op_blend_rel_pas_dp_sse3 _op_blend_rel_p_dp_sse3 - -#define _op_blend_rel_p_dpan_sse3 _op_blend_p_dpan_sse3 -#define _op_blend_rel_pan_dpan_sse3 _op_blend_pan_dpan_sse3 -#define _op_blend_rel_pas_dpan_sse3 _op_blend_pas_dpan_sse3 - -static void -init_blend_rel_pixel_span_funcs_sse3(void) -{ - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_dp_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_dp_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_dp_sse3; - - op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_dpan_sse3; - op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_dpan_sse3; - op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_dpan_sse3; -} - -#define _op_blend_rel_pt_p_dp_sse3 NULL -#define _op_blend_rel_pt_pan_dp_sse3 NULL - -#define _op_blend_rel_pt_pas_dp_sse3 _op_blend_rel_pt_p_dp_sse3 - -#define _op_blend_rel_pt_p_dpan_sse3 _op_blend_pt_p_dpan_sse3 -#define _op_blend_rel_pt_pan_dpan_sse3 _op_blend_pt_pan_dpan_sse3 -#define _op_blend_rel_pt_pas_dpan_sse3 _op_blend_pt_pas_dpan_sse3 - -static void -init_blend_rel_pixel_pt_funcs_sse3(void) -{ - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_dp_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_dp_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_dp_sse3; - - op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_dpan_sse3; - op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_dpan_sse3; - op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_dpan_sse3; -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c deleted file mode 100644 index a1a5de8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c +++ /dev/null @@ -1,671 +0,0 @@ -#include "evas_common.h" - -RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_blend_init(void); -static void op_blend_shutdown(void); - -static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_blend = { "blend", - op_blend_init, op_blend_shutdown, - op_blend_pixel_span_get, op_blend_color_span_get, - op_blend_pixel_color_span_get, op_blend_mask_color_span_get, - op_blend_pixel_mask_span_get, - op_blend_pixel_pt_get, op_blend_color_pt_get, - op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get, - op_blend_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_blend_get(void) -{ - return &(_composite_blend); -} - - -RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_blend_rel_init(void); -static void op_blend_rel_shutdown(void); - -static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", - op_blend_rel_init, op_blend_rel_shutdown, - op_blend_rel_pixel_span_get, op_blend_rel_color_span_get, - op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get, - op_blend_rel_pixel_mask_span_get, - op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get, - op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get, - op_blend_rel_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_blend_rel_get(void) -{ - return &(_composite_blend_rel); -} - - -# include "./evas_op_blend/op_blend_pixel_.c" -# include "./evas_op_blend/op_blend_color_.c" -# include "./evas_op_blend/op_blend_pixel_color_.c" -# include "./evas_op_blend/op_blend_pixel_mask_.c" -# include "./evas_op_blend/op_blend_mask_color_.c" -//# include "./evas_op_blend/op_blend_pixel_mask_color_.c" - -# include "./evas_op_blend/op_blend_pixel_i386.c" -# include "./evas_op_blend/op_blend_color_i386.c" -# include "./evas_op_blend/op_blend_pixel_color_i386.c" -# include "./evas_op_blend/op_blend_pixel_mask_i386.c" -# include "./evas_op_blend/op_blend_mask_color_i386.c" -//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c" - -# include "./evas_op_blend/op_blend_pixel_neon.c" -# include "./evas_op_blend/op_blend_color_neon.c" -# include "./evas_op_blend/op_blend_pixel_color_neon.c" -# include "./evas_op_blend/op_blend_pixel_mask_neon.c" -# include "./evas_op_blend/op_blend_mask_color_neon.c" -//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c" - -#ifdef BUILD_SSE3 -void evas_common_op_blend_init_sse3(void); -#endif - -static void -op_blend_init(void) -{ - memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs)); - memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs)); -#ifdef BUILD_SSE3 - evas_common_op_blend_init_sse3(); -#endif -#ifdef BUILD_MMX - init_blend_pixel_span_funcs_mmx(); - init_blend_pixel_color_span_funcs_mmx(); - init_blend_pixel_mask_span_funcs_mmx(); - init_blend_color_span_funcs_mmx(); - init_blend_mask_color_span_funcs_mmx(); - - init_blend_pixel_pt_funcs_mmx(); - init_blend_pixel_color_pt_funcs_mmx(); - init_blend_pixel_mask_pt_funcs_mmx(); - init_blend_color_pt_funcs_mmx(); - init_blend_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_NEON - init_blend_pixel_span_funcs_neon(); - init_blend_pixel_color_span_funcs_neon(); - init_blend_pixel_mask_span_funcs_neon(); - init_blend_color_span_funcs_neon(); - init_blend_mask_color_span_funcs_neon(); - - init_blend_pixel_pt_funcs_neon(); - init_blend_pixel_color_pt_funcs_neon(); - init_blend_pixel_mask_pt_funcs_neon(); - init_blend_color_pt_funcs_neon(); - init_blend_mask_color_pt_funcs_neon(); -#endif -#ifdef BUILD_C - init_blend_pixel_span_funcs_c(); - init_blend_pixel_color_span_funcs_c(); - init_blend_pixel_mask_span_funcs_c(); - init_blend_color_span_funcs_c(); - init_blend_mask_color_span_funcs_c(); - - init_blend_pixel_pt_funcs_c(); - init_blend_pixel_color_pt_funcs_c(); - init_blend_pixel_mask_pt_funcs_c(); - init_blend_color_pt_funcs_c(); - init_blend_mask_color_pt_funcs_c(); -#endif -} - -static void -op_blend_shutdown(void) -{ -} - -static RGBA_Gfx_Func -blend_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_SSE3 - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) - { - cpu = CPU_SSE3; - func = op_blend_span_funcs[s][m][c][d][cpu]; - if(func) return func; - } -#endif -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_blend_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_blend_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_blend_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - s = SP; - if (src->cache_entry.flags.alpha_sparse) - s = SP_AS; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - s = SP; - if (src->cache_entry.flags.alpha_sparse) - s = SP_AS; - } - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - s = SP; - if (src->cache_entry.flags.alpha_sparse) - s = SP_AS; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_span_func_cpu(s, m, c, d); -} - - -static RGBA_Gfx_Pt_Func -blend_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_SSE3 - if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) - { - cpu = CPU_SSE3; - func = op_blend_pt_funcs[s][m][c][d][cpu]; - if(func) return func; - } -#endif -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_blend_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_blend_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_blend_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_gfx_pt_func_cpu(s, m, c, d); -} - -void evas_common_op_blend_rel_init_sse3(void); - -static void -op_blend_rel_init(void) -{ - memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs)); - memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs)); -#ifdef BUILD_SSE3 - evas_common_op_blend_rel_init_sse3(); -#endif -#ifdef BUILD_MMX - init_blend_rel_pixel_span_funcs_mmx(); - init_blend_rel_pixel_color_span_funcs_mmx(); - init_blend_rel_pixel_mask_span_funcs_mmx(); - init_blend_rel_color_span_funcs_mmx(); - init_blend_rel_mask_color_span_funcs_mmx(); - - init_blend_rel_pixel_pt_funcs_mmx(); - init_blend_rel_pixel_color_pt_funcs_mmx(); - init_blend_rel_pixel_mask_pt_funcs_mmx(); - init_blend_rel_color_pt_funcs_mmx(); - init_blend_rel_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_NEON - init_blend_rel_pixel_span_funcs_neon(); - init_blend_rel_pixel_color_span_funcs_neon(); - init_blend_rel_pixel_mask_span_funcs_neon(); - init_blend_rel_color_span_funcs_neon(); - init_blend_rel_mask_color_span_funcs_neon(); - - init_blend_rel_pixel_pt_funcs_neon(); - init_blend_rel_pixel_color_pt_funcs_neon(); - init_blend_rel_pixel_mask_pt_funcs_neon(); - init_blend_rel_color_pt_funcs_neon(); - init_blend_rel_mask_color_pt_funcs_neon(); -#endif -#ifdef BUILD_C - init_blend_rel_pixel_span_funcs_c(); - init_blend_rel_pixel_color_span_funcs_c(); - init_blend_rel_pixel_mask_span_funcs_c(); - init_blend_rel_color_span_funcs_c(); - init_blend_rel_mask_color_span_funcs_c(); - - init_blend_rel_pixel_pt_funcs_c(); - init_blend_rel_pixel_color_pt_funcs_c(); - init_blend_rel_pixel_mask_pt_funcs_c(); - init_blend_rel_color_pt_funcs_c(); - init_blend_rel_mask_color_pt_funcs_c(); -#endif -} - -static void -op_blend_rel_shutdown(void) -{ -} - -static RGBA_Gfx_Func -blend_rel_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_SSE3 - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) - { - cpu = CPU_SSE3; - func = op_blend_rel_span_funcs[s][m][c][d][cpu]; - if(func) return func; - } -#endif -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_blend_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_blend_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_blend_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - s = SP; - if (src->cache_entry.flags.alpha_sparse) - s = SP_AS; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - s = SP; - if (src->cache_entry.flags.alpha_sparse) - s = SP_AS; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_SSE3 - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) - { - cpu = CPU_SSE3; - func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; - if(func) return func; - } -#endif -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return blend_rel_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am deleted file mode 100644 index 599e98d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_copy_color_.c \ -op_copy_color_i386.c \ -op_copy_color_neon.c \ -op_copy_mask_color_.c \ -op_copy_mask_color_i386.c \ -op_copy_mask_color_neon.c \ -op_copy_pixel_.c \ -op_copy_pixel_neon.c \ -op_copy_pixel_color_.c \ -op_copy_pixel_color_i386.c \ -op_copy_pixel_color_neon.c \ -op_copy_pixel_i386.c \ -op_copy_pixel_mask_.c \ -op_copy_pixel_mask_i386.c \ -op_copy_pixel_mask_neon.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in deleted file mode 100644 index 687f34d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in +++ /dev/null @@ -1,552 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_copy -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_copy_color_.c \ -op_copy_color_i386.c \ -op_copy_color_neon.c \ -op_copy_mask_color_.c \ -op_copy_mask_color_i386.c \ -op_copy_mask_color_neon.c \ -op_copy_pixel_.c \ -op_copy_pixel_neon.c \ -op_copy_pixel_color_.c \ -op_copy_pixel_color_i386.c \ -op_copy_pixel_color_neon.c \ -op_copy_pixel_i386.c \ -op_copy_pixel_mask_.c \ -op_copy_pixel_mask_i386.c \ -op_copy_pixel_mask_neon.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c deleted file mode 100644 index 0178358..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c +++ /dev/null @@ -1,138 +0,0 @@ -/* copy color --> dst */ - -#ifdef BUILD_C -static void -_op_copy_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = c; - d++; - }); -} - -#define _op_copy_cn_dp _op_copy_c_dp -#define _op_copy_can_dp _op_copy_c_dp -#define _op_copy_caa_dp _op_copy_c_dp - -#define _op_copy_c_dpan _op_copy_c_dp -#define _op_copy_cn_dpan _op_copy_c_dp -#define _op_copy_can_dpan _op_copy_c_dp -#define _op_copy_caa_dpan _op_copy_c_dp - -static void -init_copy_color_span_funcs_c(void) -{ - op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_cn_dp; - op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_c_dp; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_can_dp; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_caa_dp; - - op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_cn_dpan; - op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_c_dpan; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = c; -} - -#define _op_copy_pt_cn_dp _op_copy_pt_c_dp -#define _op_copy_pt_can_dp _op_copy_pt_c_dp -#define _op_copy_pt_caa_dp _op_copy_pt_c_dp - -#define _op_copy_pt_c_dpan _op_copy_pt_c_dp -#define _op_copy_pt_cn_dpan _op_copy_pt_c_dp -#define _op_copy_pt_can_dpan _op_copy_pt_c_dp -#define _op_copy_pt_caa_dpan _op_copy_pt_c_dp - -static void -init_copy_color_pt_funcs_c(void) -{ - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_cn_dp; - op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_pt_c_dp; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_can_dp; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_caa_dp; - - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_cn_dpan; - op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_c_dpan; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_can_dpan; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_caa_dpan; -} -#endif - -/*-----*/ - -/* copy_rel color --> dst */ - -#ifdef BUILD_C -static void -_op_copy_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_SYM(*d >> 24, c); - d++; - }); -} - - -#define _op_copy_rel_cn_dp _op_copy_rel_c_dp -#define _op_copy_rel_can_dp _op_copy_rel_c_dp -#define _op_copy_rel_caa_dp _op_copy_rel_c_dp - -#define _op_copy_rel_c_dpan _op_copy_c_dp -#define _op_copy_rel_cn_dpan _op_copy_cn_dp -#define _op_copy_rel_can_dpan _op_copy_can_dp -#define _op_copy_rel_caa_dpan _op_copy_caa_dp - -static void -init_copy_rel_color_span_funcs_c(void) -{ - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_cn_dp; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_c_dp; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_can_dp; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_caa_dp; - - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_cn_dpan; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_c_dpan; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_can_dpan; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - *d = MUL_256(s, c); -} - - -#define _op_copy_rel_pt_cn_dp _op_copy_rel_pt_c_dp -#define _op_copy_rel_pt_can_dp _op_copy_rel_pt_c_dp -#define _op_copy_rel_pt_caa_dp _op_copy_rel_pt_c_dp - -#define _op_copy_rel_pt_c_dpan _op_copy_pt_c_dp -#define _op_copy_rel_pt_cn_dpan _op_copy_pt_cn_dp -#define _op_copy_rel_pt_can_dpan _op_copy_pt_can_dp -#define _op_copy_rel_pt_caa_dpan _op_copy_pt_caa_dp - -static void -init_copy_rel_color_pt_funcs_c(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_cn_dp; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_c_dp; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_can_dp; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_caa_dp; - - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_cn_dpan; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_c_dpan; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_can_dpan; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c deleted file mode 100644 index d864d92..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c +++ /dev/null @@ -1,150 +0,0 @@ -/* copy color --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l - 1; - movd_m2r(c, mm1); - movq_r2r(mm1, mm2); - psllq_i2r(32, mm1); - por_r2r(mm2, mm1); - for (; d < e; d+=2) { - movq_r2m(mm1, d[0]); - } - e+=1; - for (; d < e; d++) { - *d = c; - } -} - -#define _op_copy_cn_dp_mmx _op_copy_c_dp_mmx -#define _op_copy_can_dp_mmx _op_copy_c_dp_mmx -#define _op_copy_caa_dp_mmx _op_copy_c_dp_mmx - -#define _op_copy_cn_dpan_mmx _op_copy_c_dp_mmx -#define _op_copy_c_dpan_mmx _op_copy_c_dp_mmx -#define _op_copy_can_dpan_mmx _op_copy_c_dp_mmx -#define _op_copy_caa_dpan_mmx _op_copy_c_dp_mmx - -static void -init_copy_color_span_funcs_mmx(void) -{ - op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_cn_dp_mmx; - op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_c_dp_mmx; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_can_dp_mmx; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_caa_dp_mmx; - - op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_cn_dpan_mmx; - op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_c_dpan_mmx; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_can_dpan_mmx; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = c; -} - -#define _op_copy_pt_cn_dp_mmx _op_copy_pt_c_dp_mmx -#define _op_copy_pt_can_dp_mmx _op_copy_pt_c_dp_mmx -#define _op_copy_pt_caa_dp_mmx _op_copy_pt_c_dp_mmx - -#define _op_copy_pt_cn_dpan_mmx _op_copy_pt_c_dp_mmx -#define _op_copy_pt_c_dpan_mmx _op_copy_pt_c_dp_mmx -#define _op_copy_pt_can_dpan_mmx _op_copy_pt_c_dp_mmx -#define _op_copy_pt_caa_dpan_mmx _op_copy_pt_c_dp_mmx - -static void -init_copy_color_pt_funcs_mmx(void) -{ - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_cn_dp_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_c_dp_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_can_dp_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_caa_dp_mmx; - - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_cn_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_c_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_can_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_caa_dpan_mmx; -} -#endif - -/*-----*/ - -/* copy_rel color --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - for (; d < e; d++) { - DATA32 da = 1 + (*d >> 24); - MOV_A2R(da, mm1) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) - } -} - -#define _op_copy_rel_cn_dp_mmx _op_copy_rel_c_dp_mmx -#define _op_copy_rel_can_dp_mmx _op_copy_rel_c_dp_mmx -#define _op_copy_rel_caa_dp_mmx _op_copy_rel_c_dp_mmx - -#define _op_copy_rel_cn_dpan_mmx _op_copy_cn_dpan_mmx -#define _op_copy_rel_c_dpan_mmx _op_copy_c_dpan_mmx -#define _op_copy_rel_can_dpan_mmx _op_copy_can_dpan_mmx -#define _op_copy_rel_caa_dpan_mmx _op_copy_caa_dpan_mmx - -static void -init_copy_rel_color_span_funcs_mmx(void) -{ - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_cn_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_c_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_can_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_caa_dp_mmx; - - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_cn_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_c_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_can_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_rel_pt_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(s, mm1) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_copy_rel_pt_cn_dp_mmx _op_copy_rel_pt_c_dp_mmx -#define _op_copy_rel_pt_can_dp_mmx _op_copy_rel_pt_c_dp_mmx -#define _op_copy_rel_pt_caa_dp_mmx _op_copy_rel_pt_c_dp_mmx - -#define _op_copy_rel_pt_cn_dpan_mmx _op_copy_pt_cn_dpan_mmx -#define _op_copy_rel_pt_c_dpan_mmx _op_copy_pt_c_dpan_mmx -#define _op_copy_rel_pt_can_dpan_mmx _op_copy_pt_can_dpan_mmx -#define _op_copy_rel_pt_caa_dpan_mmx _op_copy_pt_caa_dpan_mmx - -static void -init_copy_rel_color_pt_funcs_mmx(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_cn_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_c_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_can_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_caa_dp_mmx; - - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_cn_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_c_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_can_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c deleted file mode 100644 index 96310cd..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c +++ /dev/null @@ -1,212 +0,0 @@ -/* copy color --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { -#define AP "COPY_C_DP_" - uint32_t *e = d + l,*tmp; - asm volatile ( - ".fpu neon \n\t" - - "vdup.i32 q0, %[c] \n\t" - - // Can we do 32 byte? - "andS %[tmp], %[d], $0x1f \n\t" - "beq "AP"quadstart \n\t" - - // Can we do at least 16 byte? - "andS %[tmp], %[d], $0x4 \n\t" - "beq "AP"dualstart \n\t" - - // Only once - AP"singleloop: \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - "add %[d], #4 \n\t" - - // Up to 3 times - AP"dualstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - AP"dualloop: \n\t" - "vstr.32 d0, [%[d]] \n\t" - - "add %[d], #8 \n\t" - "andS %[tmp], %[d], $0x1f \n\t" - "bne "AP"dualloop \n\t" - - - AP"quadstart: \n\t" - "sub %[tmp], %[e], %[d] \n\t" - "cmp %[tmp], #32 \n\t" - "blt "AP"loopout \n\t" - - "vmov q1, q0 \n\t" - "sub %[tmp],%[e],#31 \n\t" - - AP "quadloop: \n\t" - "vstm %[d]!, {d0,d1,d2,d3} \n\t" - - "cmp %[tmp], %[d] \n\t" - "bhi "AP"quadloop \n\t" - - - AP "loopout: \n\t" - "cmp %[d], %[e] \n\t" - "beq "AP"done \n\t" - "sub %[tmp],%[e], %[d] \n\t" - "cmp %[tmp],$0x04 \n\t" - "beq "AP"singleloop2 \n\t" - - AP "dualloop2: \n\t" - "sub %[tmp],%[e],#7 \n\t" - AP "dualloop2int: \n\t" - "vstr.64 d0, [%[d]] \n\t" - - "add %[d], #8 \n\t" - "cmp %[tmp], %[d] \n\t" - "bhi "AP"dualloop2int \n\t" - - // Single ?? - "cmp %[e], %[d] \n\t" - "beq "AP"done \n\t" - - AP "singleloop2: \n\t" - "vst1.32 d0[0], [%[d]] \n\t" - - AP "done:\n\t" - - : // No output regs - // Input - : [c] "r" (c), [e] "r" (e), [d] "r" (d),[tmp] "r" (tmp) - // Clobbered - : "q0","q1","memory" - - - ); -} - -#define _op_copy_cn_dp_neon _op_copy_c_dp_neon -#define _op_copy_can_dp_neon _op_copy_c_dp_neon -#define _op_copy_caa_dp_neon _op_copy_c_dp_neon - -#define _op_copy_cn_dpan_neon _op_copy_c_dp_neon -#define _op_copy_c_dpan_neon _op_copy_c_dp_neon -#define _op_copy_can_dpan_neon _op_copy_c_dp_neon -#define _op_copy_caa_dpan_neon _op_copy_c_dp_neon - -static void -init_copy_color_span_funcs_neon(void) -{ - op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_cn_dp_neon; - op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_c_dp_neon; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_can_dp_neon; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_caa_dp_neon; - - op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_cn_dpan_neon; - op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_c_dpan_neon; - op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_can_dpan_neon; - op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - *d = c; -} - -#define _op_copy_pt_cn_dp_neon _op_copy_pt_c_dp_neon -#define _op_copy_pt_can_dp_neon _op_copy_pt_c_dp_neon -#define _op_copy_pt_caa_dp_neon _op_copy_pt_c_dp_neon - -#define _op_copy_pt_cn_dpan_neon _op_copy_pt_c_dp_neon -#define _op_copy_pt_c_dpan_neon _op_copy_pt_c_dp_neon -#define _op_copy_pt_can_dpan_neon _op_copy_pt_c_dp_neon -#define _op_copy_pt_caa_dpan_neon _op_copy_pt_c_dp_neon - -static void -init_copy_color_pt_funcs_neon(void) -{ - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_cn_dp_neon; - op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_c_dp_neon; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_can_dp_neon; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_caa_dp_neon; - - op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_cn_dpan_neon; - op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_c_dpan_neon; - op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_can_dpan_neon; - op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_caa_dpan_neon; -} -#endif - -/*-----*/ - -/* copy_rel color --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_rel_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e = d + l; - for (; d < e; d++) { - *d = MUL_SYM(*d >> 24, c); - } -} - -#define _op_copy_rel_cn_dp_neon _op_copy_rel_c_dp_neon -#define _op_copy_rel_can_dp_neon _op_copy_rel_c_dp_neon -#define _op_copy_rel_caa_dp_neon _op_copy_rel_c_dp_neon - -#define _op_copy_rel_cn_dpan_neon _op_copy_cn_dpan_neon -#define _op_copy_rel_c_dpan_neon _op_copy_c_dpan_neon -#define _op_copy_rel_can_dpan_neon _op_copy_can_dpan_neon -#define _op_copy_rel_caa_dpan_neon _op_copy_caa_dpan_neon - -static void -init_copy_rel_color_span_funcs_neon(void) -{ - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_cn_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_c_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_can_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_caa_dp_neon; - - op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_cn_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_c_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_can_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_rel_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - *d = MUL_256(s, c); -} - - -#define _op_copy_rel_pt_cn_dp_neon _op_copy_rel_pt_c_dp_neon -#define _op_copy_rel_pt_can_dp_neon _op_copy_rel_pt_c_dp_neon -#define _op_copy_rel_pt_caa_dp_neon _op_copy_rel_pt_c_dp_neon - -#define _op_copy_rel_pt_cn_dpan_neon _op_copy_pt_cn_dpan_neon -#define _op_copy_rel_pt_c_dpan_neon _op_copy_pt_c_dpan_neon -#define _op_copy_rel_pt_can_dpan_neon _op_copy_pt_can_dpan_neon -#define _op_copy_rel_pt_caa_dpan_neon _op_copy_pt_caa_dpan_neon - -static void -init_copy_rel_color_pt_funcs_neon(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_cn_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_c_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_can_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_caa_dp_neon; - - op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_cn_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_c_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_can_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c deleted file mode 100644 index c03a843..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c +++ /dev/null @@ -1,170 +0,0 @@ -/* copy mask x color -> dst */ - -#ifdef BUILD_C -static void -_op_copy_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = c; - break; - default: - color++; - *d = INTERP_256(color, c, *d); - break; - } - m++; d++; - }); -} - -#define _op_copy_mas_cn_dp _op_copy_mas_c_dp -#define _op_copy_mas_can_dp _op_copy_mas_c_dp -#define _op_copy_mas_caa_dp _op_copy_mas_c_dp - -#define _op_copy_mas_c_dpan _op_copy_mas_c_dp -#define _op_copy_mas_cn_dpan _op_copy_mas_c_dpan -#define _op_copy_mas_can_dpan _op_copy_mas_c_dpan -#define _op_copy_mas_caa_dpan _op_copy_mas_c_dpan - -static void -init_copy_mask_color_span_funcs_c(void) -{ - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_mas_cn_dp; - op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_mas_c_dp; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_mas_can_dp; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_mas_caa_dp; - - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_mas_cn_dpan; - op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_mas_c_dpan; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_mas_can_dpan; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { - *d = INTERP_256(m + 1, c, *d); -} - - -#define _op_copy_pt_mas_cn_dp _op_copy_pt_mas_c_dp -#define _op_copy_pt_mas_can_dp _op_copy_pt_mas_c_dp -#define _op_copy_pt_mas_caa_dp _op_copy_pt_mas_c_dp - -#define _op_copy_pt_mas_c_dpan _op_copy_pt_mas_c_dp -#define _op_copy_pt_mas_cn_dpan _op_copy_pt_mas_c_dpan -#define _op_copy_pt_mas_can_dpan _op_copy_pt_mas_c_dpan -#define _op_copy_pt_mas_caa_dpan _op_copy_pt_mas_c_dpan - -static void -init_copy_mask_color_pt_funcs_c(void) -{ - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_mas_cn_dp; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_pt_mas_c_dp; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_pt_mas_can_dp; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_pt_mas_caa_dp; - - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_mas_cn_dpan; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_pt_mas_c_dpan; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_pt_mas_can_dpan; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_pt_mas_caa_dpan; -} -#endif - -/*-----*/ - -/* copy_rel mask x color -> dst */ - -#ifdef BUILD_C -static void -_op_copy_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - color = 1 + (*d >> 24); - *d = MUL_256(color, c); - break; - default: - { - DATA32 da = 1 + (*d >> 24); - da = MUL_256(da, c); - color++; - *d = INTERP_256(color, da, *d); - } - break; - } - m++; d++; - }); -} - - -#define _op_copy_rel_mas_cn_dp _op_copy_rel_mas_c_dp -#define _op_copy_rel_mas_can_dp _op_copy_rel_mas_c_dp -#define _op_copy_rel_mas_caa_dp _op_copy_rel_mas_c_dp - -#define _op_copy_rel_mas_c_dpan _op_copy_mas_c_dpan -#define _op_copy_rel_mas_cn_dpan _op_copy_mas_cn_dpan -#define _op_copy_rel_mas_can_dpan _op_copy_mas_can_dpan -#define _op_copy_rel_mas_caa_dpan _op_copy_mas_caa_dpan - -static void -init_copy_rel_mask_color_span_funcs_c(void) -{ - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_mas_cn_dp; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_mas_c_dp; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_mas_can_dp; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_mas_caa_dp; - - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_mas_cn_dpan; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_mas_c_dpan; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_mas_can_dpan; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - s = MUL_256(s, c); - *d = INTERP_256(m + 1, s, *d); -} - -#define _op_copy_rel_pt_mas_cn_dp _op_copy_rel_pt_mas_c_dp -#define _op_copy_rel_pt_mas_can_dp _op_copy_rel_pt_mas_c_dp -#define _op_copy_rel_pt_mas_caa_dp _op_copy_rel_pt_mas_c_dp - -#define _op_copy_rel_pt_mas_c_dpan _op_copy_pt_mas_c_dpan -#define _op_copy_rel_pt_mas_cn_dpan _op_copy_pt_mas_cn_dpan -#define _op_copy_rel_pt_mas_can_dpan _op_copy_pt_mas_can_dpan -#define _op_copy_rel_pt_mas_caa_dpan _op_copy_pt_mas_caa_dpan - -static void -init_copy_rel_mask_color_pt_funcs_c(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_mas_cn_dp; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_pt_mas_c_dp; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_pt_mas_can_dp; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_pt_mas_caa_dp; - - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_mas_cn_dpan; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_pt_mas_c_dpan; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_mas_can_dpan; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_mas_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c deleted file mode 100644 index e27493f..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c +++ /dev/null @@ -1,193 +0,0 @@ -/* copy mask x color -> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = c; - break; - default: - { - l++; - MOV_A2R(l, mm3) - MOV_P2R(*d, mm1, mm0) - movq_r2r(mm2, mm4); - INTERP_256_R2R(mm3, mm4, mm1, mm5); - MOV_R2P(mm1, *d, mm0) - } - break; - } - m++; d++; - } -} - -#define _op_copy_mas_cn_dp_mmx _op_copy_mas_c_dp_mmx -#define _op_copy_mas_can_dp_mmx _op_copy_mas_c_dp_mmx -#define _op_copy_mas_caa_dp_mmx _op_copy_mas_c_dp_mmx - -#define _op_copy_mas_c_dpan_mmx _op_copy_mas_c_dp_mmx -#define _op_copy_mas_cn_dpan_mmx _op_copy_mas_c_dpan_mmx -#define _op_copy_mas_can_dpan_mmx _op_copy_mas_c_dpan_mmx -#define _op_copy_mas_caa_dpan_mmx _op_copy_mas_c_dpan_mmx - -static void -init_copy_mask_color_span_funcs_mmx(void) -{ - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_mas_cn_dp_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_mas_c_dp_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_mas_can_dp_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_mas_caa_dp_mmx; - - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_mas_cn_dpan_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_mas_c_dpan_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_mas_can_dpan_mmx; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_mas_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = m + 1; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(s, mm3) - MOV_P2R(*d, mm1, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_copy_pt_mas_cn_dp_mmx _op_copy_pt_mas_c_dp_mmx -#define _op_copy_pt_mas_can_dp_mmx _op_copy_pt_mas_c_dp_mmx -#define _op_copy_pt_mas_caa_dp_mmx _op_copy_pt_mas_c_dp_mmx - -#define _op_copy_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dp_mmx -#define _op_copy_pt_mas_cn_dpan_mmx _op_copy_pt_mas_c_dpan_mmx -#define _op_copy_pt_mas_can_dpan_mmx _op_copy_pt_mas_c_dpan_mmx -#define _op_copy_pt_mas_caa_dpan_mmx _op_copy_pt_mas_c_dpan_mmx - -static void -init_copy_mask_color_pt_funcs_mmx(void) -{ - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_mas_cn_dp_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_pt_mas_c_dp_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_pt_mas_can_dp_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_pt_mas_caa_dp_mmx; - - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_mas_cn_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_pt_mas_c_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_mas_can_dpan_mmx; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_mas_caa_dpan_mmx; -} -#endif - -/*-----*/ - -/* copy_rel mask x color -> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - l = 1 + (*d >> 24); - MOV_A2R(l, mm1) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) - break; - default: - l++; - MOV_A2R(l, mm3) - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MUL4_256_R2R(mm2, mm4) - INTERP_256_R2R(mm3, mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -#define _op_copy_rel_mas_cn_dp_mmx _op_copy_rel_mas_c_dp_mmx -#define _op_copy_rel_mas_can_dp_mmx _op_copy_rel_mas_c_dp_mmx -#define _op_copy_rel_mas_caa_dp_mmx _op_copy_rel_mas_c_dp_mmx - -#define _op_copy_rel_mas_c_dpan_mmx _op_copy_mas_c_dpan_mmx -#define _op_copy_rel_mas_cn_dpan_mmx _op_copy_mas_cn_dpan_mmx -#define _op_copy_rel_mas_can_dpan_mmx _op_copy_mas_can_dpan_mmx -#define _op_copy_rel_mas_caa_dpan_mmx _op_copy_mas_caa_dpan_mmx - -static void -init_copy_rel_mask_color_span_funcs_mmx(void) -{ - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_mas_cn_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_mas_c_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_mas_can_dp_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_mas_caa_dp_mmx; - - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_mas_cn_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_mas_c_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_mas_can_dpan_mmx; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_mas_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = m + 1; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_A2R(s, mm3) - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm4) - MOV_P2R(c, mm2, mm0) - MUL4_256_R2R(mm2, mm4) - INTERP_256_R2R(mm3, mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_copy_rel_pt_mas_cn_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx -#define _op_copy_rel_pt_mas_can_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx -#define _op_copy_rel_pt_mas_caa_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx - -#define _op_copy_rel_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dpan_mmx -#define _op_copy_rel_pt_mas_cn_dpan_mmx _op_copy_pt_mas_cn_dpan_mmx -#define _op_copy_rel_pt_mas_can_dpan_mmx _op_copy_pt_mas_can_dpan_mmx -#define _op_copy_rel_pt_mas_caa_dpan_mmx _op_copy_pt_mas_caa_dpan_mmx - -static void -init_copy_rel_mask_color_pt_funcs_mmx(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_mas_cn_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_pt_mas_c_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_mas_can_dp_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_mas_caa_dp_mmx; - - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_cn_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_c_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_can_dpan_mmx; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c deleted file mode 100644 index dc7f78f..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c +++ /dev/null @@ -1,170 +0,0 @@ -/* copy mask x color -> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = c; - break; - default: - color++; - *d = INTERP_256(color, c, *d); - break; - } - m++; d++; - }); -} - -#define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon -#define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon -#define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon - -#define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon -#define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon -#define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon -#define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon - -static void -init_copy_mask_color_span_funcs_neon(void) -{ - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon; - op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon; - - op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon; - op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon; - op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon; - op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - *d = INTERP_256(m + 1, c, *d); -} - -#define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon -#define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon -#define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon - -#define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon -#define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon -#define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon -#define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon - -static void -init_copy_mask_color_pt_funcs_neon(void) -{ - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon; - - op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon; - op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon; -} -#endif - -/*-----*/ - -/* copy_rel mask x color -> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - color = 1 + (*d >> 24); - *d = MUL_256(color, c); - break; - default: - { - DATA32 da = 1 + (*d >> 24); - da = MUL_256(da, c); - color++; - *d = INTERP_256(color, da, *d); - } - break; - } - m++; d++; - }); -} - -#define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon -#define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon -#define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon - -#define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon -#define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon -#define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon -#define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon - -static void -init_copy_rel_mask_color_span_funcs_neon(void) -{ - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon; - - op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon; - op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - s = MUL_256(s, c); - *d = INTERP_256(m + 1, s, *d); -} - -#define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon -#define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon -#define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon - -#define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon -#define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon -#define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon -#define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon - -static void -init_copy_rel_mask_color_pt_funcs_neon(void) -{ - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon; - - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon; - op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c deleted file mode 100644 index 45d59d0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c +++ /dev/null @@ -1,117 +0,0 @@ -/* copy pixel --> dst */ - -#ifdef BUILD_C -static void -_op_copy_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - memcpy(d, s, l * sizeof(DATA32)); -} - -#define _op_copy_pan_dp _op_copy_p_dp -#define _op_copy_pas_dp _op_copy_p_dp - -#define _op_copy_p_dpan _op_copy_p_dp -#define _op_copy_pan_dpan _op_copy_pan_dp -#define _op_copy_pas_dpan _op_copy_pas_dp - -static void -init_copy_pixel_span_funcs_c(void) -{ - op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_p_dp; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pan_dp; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pas_dp; - - op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_p_dpan; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pan_dpan; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = s; -} - -#define _op_copy_pt_pan_dp _op_copy_pt_p_dp -#define _op_copy_pt_pas_dp _op_copy_pt_p_dp - -#define _op_copy_pt_p_dpan _op_copy_pt_p_dp -#define _op_copy_pt_pan_dpan _op_copy_pt_pan_dp -#define _op_copy_pt_pas_dpan _op_copy_pt_pas_dp - -static void -init_copy_pixel_pt_funcs_c(void) -{ - op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_p_dp; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pan_dp; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pas_dp; - - op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_dpan; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_dpan; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_dpan; -} -#endif - -/*-----*/ - -/* copy_rel pixel --> dst */ - -#ifdef BUILD_C -static void -_op_copy_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_SYM(*d >> 24, *s); - d++; s++; - }); -} - - -#define _op_copy_rel_pas_dp _op_copy_rel_p_dp -#define _op_copy_rel_pan_dp _op_copy_rel_p_dp - -#define _op_copy_rel_p_dpan _op_copy_p_dpan -#define _op_copy_rel_pan_dpan _op_copy_pan_dpan -#define _op_copy_rel_pas_dpan _op_copy_pas_dpan - -static void -init_copy_rel_pixel_span_funcs_c(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_p_dp; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pan_dp; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pas_dp; - - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_dpan; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_dpan; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 1 + (*d >> 24); - *d = MUL_256(c, s); -} - - -#define _op_copy_rel_pt_pan_dp _op_copy_rel_pt_p_dp -#define _op_copy_rel_pt_pas_dp _op_copy_rel_pt_p_dp - -#define _op_copy_rel_pt_p_dpan _op_copy_pt_p_dpan -#define _op_copy_rel_pt_pan_dpan _op_copy_pt_pan_dpan -#define _op_copy_rel_pt_pas_dpan _op_copy_pt_pas_dpan - -static void -init_copy_rel_pixel_pt_funcs_c(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_dp; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_dp; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_dp; - - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_dpan; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_dpan; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c deleted file mode 100644 index 12b616d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c +++ /dev/null @@ -1,236 +0,0 @@ -/* copy pixel x color --> dst */ - -#ifdef BUILD_C -static void -_op_copy_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL4_SYM(c, *s); - d++; - s++; - }); -} - -static void -_op_copy_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - c = 1 + (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_256(c, *s); - d++; - s++; - }); -} - - -#define _op_copy_pas_c_dp _op_copy_p_c_dp -#define _op_copy_pan_c_dp _op_copy_p_c_dp -#define _op_copy_p_can_dp _op_copy_p_c_dp -#define _op_copy_pas_can_dp _op_copy_p_can_dp -#define _op_copy_pan_can_dp _op_copy_p_c_dp -#define _op_copy_pas_caa_dp _op_copy_p_caa_dp -#define _op_copy_pan_caa_dp _op_copy_p_caa_dp - -#define _op_copy_p_c_dpan _op_copy_p_c_dp -#define _op_copy_pas_c_dpan _op_copy_pas_c_dp -#define _op_copy_pan_c_dpan _op_copy_pan_c_dp -#define _op_copy_p_can_dpan _op_copy_p_can_dp -#define _op_copy_pas_can_dpan _op_copy_pas_can_dp -#define _op_copy_pan_can_dpan _op_copy_pan_can_dp -#define _op_copy_p_caa_dpan _op_copy_p_caa_dp -#define _op_copy_pas_caa_dpan _op_copy_pas_caa_dp -#define _op_copy_pan_caa_dpan _op_copy_pan_caa_dp - -static void -init_copy_pixel_color_span_funcs_c(void) -{ - op_copy_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_p_c_dp; - op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pas_c_dp; - op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pan_c_dp; - op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_p_can_dp; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pas_can_dp; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pan_can_dp; - op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_p_caa_dp; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pas_caa_dp; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pan_caa_dp; - - op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_p_c_dpan; - op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pas_c_dpan; - op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pan_c_dpan; - op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_p_can_dpan; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pas_can_dpan; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pan_can_dpan; - op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_p_caa_dpan; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pas_caa_dpan; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = MUL4_SYM(c, s); -} - -static void -_op_copy_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = MUL_SYM(c >> 24, s); -} - - -#define _op_copy_pt_p_can_dp _op_copy_pt_p_c_dp -#define _op_copy_pt_pan_c_dp _op_copy_pt_p_c_dp -#define _op_copy_pt_pan_can_dp _op_copy_pt_p_c_dp -#define _op_copy_pt_pan_caa_dp _op_copy_pt_p_caa_dp -#define _op_copy_pt_pas_c_dp _op_copy_pt_p_c_dp -#define _op_copy_pt_pas_can_dp _op_copy_pt_p_can_dp -#define _op_copy_pt_pas_caa_dp _op_copy_pt_p_caa_dp - -#define _op_copy_pt_p_c_dpan _op_copy_pt_p_c_dp -#define _op_copy_pt_pas_c_dpan _op_copy_pt_pas_c_dp -#define _op_copy_pt_pan_c_dpan _op_copy_pt_pan_c_dp -#define _op_copy_pt_p_can_dpan _op_copy_pt_p_can_dp -#define _op_copy_pt_pas_can_dpan _op_copy_pt_pas_can_dp -#define _op_copy_pt_pan_can_dpan _op_copy_pt_pan_can_dp -#define _op_copy_pt_p_caa_dpan _op_copy_pt_p_caa_dp -#define _op_copy_pt_pas_caa_dpan _op_copy_pt_pas_caa_dp -#define _op_copy_pt_pan_caa_dpan _op_copy_pt_pan_caa_dp - -static void -init_copy_pixel_color_pt_funcs_c(void) -{ - op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_pt_p_c_dp; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pt_pas_c_dp; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pt_pan_c_dp; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_p_can_dp; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pas_can_dp; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pan_can_dp; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_p_caa_dp; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pas_caa_dp; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pan_caa_dp; - - op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_p_c_dpan; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pas_c_dpan; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pan_c_dpan; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_p_can_dpan; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pas_can_dpan; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pan_can_dpan; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_p_caa_dpan; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pas_caa_dpan; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pan_caa_dpan; -} -#endif - -/*-----*/ - -/* copy_rel pixel x color --> dst */ - -#ifdef BUILD_C -static void -_op_copy_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 cs = MUL4_SYM(c, *s); - *d = MUL_SYM(*d >> 24, cs); - d++; - s++; - }); -} - -#define _op_copy_rel_pas_c_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_pan_c_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_p_can_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_pas_can_dp _op_copy_rel_pas_c_dp -#define _op_copy_rel_pan_can_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_p_caa_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_pas_caa_dp _op_copy_rel_p_c_dp -#define _op_copy_rel_pan_caa_dp _op_copy_rel_p_c_dp - -#define _op_copy_rel_p_c_dpan _op_copy_p_c_dpan -#define _op_copy_rel_pas_c_dpan _op_copy_pas_c_dpan -#define _op_copy_rel_pan_c_dpan _op_copy_pan_c_dpan -#define _op_copy_rel_p_can_dpan _op_copy_p_can_dpan -#define _op_copy_rel_pas_can_dpan _op_copy_pas_can_dpan -#define _op_copy_rel_pan_can_dpan _op_copy_pan_can_dpan -#define _op_copy_rel_p_caa_dpan _op_copy_p_caa_dpan -#define _op_copy_rel_pas_caa_dpan _op_copy_pas_caa_dpan -#define _op_copy_rel_pan_caa_dpan _op_copy_pan_caa_dpan - -static void -init_copy_rel_pixel_color_span_funcs_c(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_p_c_dp; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pas_c_dp; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pan_c_dp; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_p_can_dp; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pas_can_dp; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pan_can_dp; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_p_caa_dp; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pas_caa_dp; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pan_caa_dp; - - op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_p_c_dpan; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pas_c_dpan; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pan_c_dpan; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_p_can_dpan; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pas_can_dpan; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pan_can_dpan; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_p_caa_dpan; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pas_caa_dpan; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - *d = MUL_SYM(*d >> 24, s); -} - -#define _op_copy_rel_pt_pas_c_dp _op_copy_rel_pt_p_c_dp -#define _op_copy_rel_pt_pan_c_dp _op_copy_rel_pt_p_c_dp -#define _op_copy_rel_pt_p_can_dp _op_copy_rel_pt_p_c_dp -#define _op_copy_rel_pt_pas_can_dp _op_copy_rel_pt_p_can_dp -#define _op_copy_rel_pt_pan_can_dp _op_copy_rel_pt_p_c_dp -#define _op_copy_rel_pt_p_caa_dp _op_copy_rel_pt_p_c_dp -#define _op_copy_rel_pt_pas_caa_dp _op_copy_rel_pt_p_caa_dp -#define _op_copy_rel_pt_pan_caa_dp _op_copy_rel_pt_p_caa_dp - -#define _op_copy_rel_pt_p_c_dpan _op_copy_pt_p_c_dpan -#define _op_copy_rel_pt_pas_c_dpan _op_copy_pt_pas_c_dpan -#define _op_copy_rel_pt_pan_c_dpan _op_copy_pt_pan_c_dpan -#define _op_copy_rel_pt_p_can_dpan _op_copy_pt_p_can_dpan -#define _op_copy_rel_pt_pas_can_dpan _op_copy_pt_pas_can_dpan -#define _op_copy_rel_pt_pan_can_dpan _op_copy_pt_pan_can_dpan -#define _op_copy_rel_pt_p_caa_dpan _op_copy_pt_p_caa_dpan -#define _op_copy_rel_pt_pas_caa_dpan _op_copy_pt_pas_caa_dpan -#define _op_copy_rel_pt_pan_caa_dpan _op_copy_pt_pan_caa_dpan - -static void -init_copy_rel_pixel_color_pt_funcs_c(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_p_c_dp; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pas_c_dp; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pan_c_dp; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_p_can_dp; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pas_can_dp; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pan_can_dp; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_p_caa_dp; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pas_caa_dp; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pan_caa_dp; - - op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_p_c_dpan; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pas_c_dpan; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pan_c_dpan; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_p_can_dpan; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pas_can_dpan; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pan_can_dpan; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_p_caa_dpan; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pas_caa_dpan; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pan_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c deleted file mode 100644 index fb5bc70..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c +++ /dev/null @@ -1,255 +0,0 @@ -/* copy pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm3, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - MOV_P2R(*s, mm2, mm0) - MUL4_SYM_R2R(mm3, mm2, mm5); - MOV_R2P(mm2, *d, mm0) - s++; d++; - } -} - - -static void -_op_copy_p_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - MOV_A2R(c, mm3) - pxor_r2r(mm0, mm0); - while (d < e) { - MOV_P2R(*s, mm2, mm0) - MUL4_256_R2R(mm3, mm2); - MOV_R2P(mm2, *d, mm0) - s++; d++; - } -} - - -#define _op_copy_pas_c_dp_mmx _op_copy_p_c_dp_mmx -#define _op_copy_pan_c_dp_mmx _op_copy_p_c_dp_mmx -#define _op_copy_p_can_dp_mmx _op_copy_p_c_dp_mmx -#define _op_copy_pas_can_dp_mmx _op_copy_pas_c_dp_mmx -#define _op_copy_pan_can_dp_mmx _op_copy_pan_c_dp_mmx -#define _op_copy_pas_caa_dp_mmx _op_copy_p_caa_dp_mmx -#define _op_copy_pan_caa_dp_mmx _op_copy_p_caa_dp_mmx - -#define _op_copy_p_c_dpan_mmx _op_copy_p_c_dp_mmx -#define _op_copy_pas_c_dpan_mmx _op_copy_pas_c_dp_mmx -#define _op_copy_pan_c_dpan_mmx _op_copy_pan_c_dp_mmx -#define _op_copy_p_can_dpan_mmx _op_copy_p_can_dp_mmx -#define _op_copy_pas_can_dpan_mmx _op_copy_pas_can_dp_mmx -#define _op_copy_pan_can_dpan_mmx _op_copy_pan_can_dp_mmx -#define _op_copy_p_caa_dpan_mmx _op_copy_p_caa_dp_mmx -#define _op_copy_pas_caa_dpan_mmx _op_copy_pas_caa_dp_mmx -#define _op_copy_pan_caa_dpan_mmx _op_copy_pan_caa_dp_mmx - -static void -init_copy_pixel_color_span_funcs_mmx(void) -{ - op_copy_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_p_c_dp_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pas_c_dp_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pan_c_dp_mmx; - op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_p_can_dp_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pas_can_dp_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pan_can_dp_mmx; - op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_p_caa_dp_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pas_caa_dp_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pan_caa_dp_mmx; - - op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_p_c_dpan_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pas_c_dpan_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pan_c_dpan_mmx; - op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_p_can_dpan_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pas_can_dpan_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pan_can_dpan_mmx; - op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_p_caa_dpan_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pas_caa_dpan_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pan_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(c, mm2, mm0) - MOV_P2R(s, mm2, mm0) - MUL4_SYM_R2R(mm3, mm2, mm5); - MOV_R2P(mm2, *d, mm0) -} - -#define _op_copy_pt_pas_c_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pan_c_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_p_can_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pas_can_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pan_can_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_p_caa_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pas_caa_dp_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pan_caa_dp_mmx _op_copy_pt_p_c_dp_mmx - -#define _op_copy_pt_p_c_dpan_mmx _op_copy_pt_p_c_dp_mmx -#define _op_copy_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dp_mmx -#define _op_copy_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dp_mmx -#define _op_copy_pt_p_can_dpan_mmx _op_copy_pt_p_can_dp_mmx -#define _op_copy_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dp_mmx -#define _op_copy_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dp_mmx -#define _op_copy_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dp_mmx -#define _op_copy_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dp_mmx -#define _op_copy_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dp_mmx - -static void -init_copy_pixel_color_pt_funcs_mmx(void) -{ - op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_p_c_dp_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pas_c_dp_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pan_c_dp_mmx; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_p_can_dp_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pas_can_dp_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pan_can_dp_mmx; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_p_caa_dp_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pas_caa_dp_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pan_caa_dp_mmx; - - op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_p_c_dpan_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pas_c_dpan_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pan_c_dpan_mmx; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_p_can_dpan_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pas_can_dpan_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pan_can_dpan_mmx; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_p_caa_dpan_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pas_caa_dpan_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pan_caa_dpan_mmx; -} -#endif - -/*-----*/ - -/* copy_rel pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_rel_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm3, mm0) - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - MOV_PA2R(*d, mm1) - MOV_P2R(*s, mm2, mm0) - MUL4_SYM_R2R(mm3, mm2, mm5); - MUL4_SYM_R2R(mm2, mm1, mm5); - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - - -#define _op_copy_rel_pas_c_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_pan_c_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_p_can_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_pas_can_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_pan_can_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_p_caa_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_pas_caa_dp_mmx _op_copy_rel_p_c_dp_mmx -#define _op_copy_rel_pan_caa_dp_mmx _op_copy_rel_p_c_dp_mmx - -#define _op_copy_rel_p_c_dpan_mmx _op_copy_p_c_dpan_mmx -#define _op_copy_rel_pas_c_dpan_mmx _op_copy_pas_c_dpan_mmx -#define _op_copy_rel_pan_c_dpan_mmx _op_copy_pan_c_dpan_mmx -#define _op_copy_rel_p_can_dpan_mmx _op_copy_p_can_dpan_mmx -#define _op_copy_rel_pas_can_dpan_mmx _op_copy_pas_can_dpan_mmx -#define _op_copy_rel_pan_can_dpan_mmx _op_copy_pan_can_dpan_mmx -#define _op_copy_rel_p_caa_dpan_mmx _op_copy_p_caa_dpan_mmx -#define _op_copy_rel_pas_caa_dpan_mmx _op_copy_pas_caa_dpan_mmx -#define _op_copy_rel_pan_caa_dpan_mmx _op_copy_pan_caa_dpan_mmx - -static void -init_copy_rel_pixel_color_span_funcs_mmx(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_p_c_dp_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pas_c_dp_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pan_c_dp_mmx; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_p_can_dp_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pas_can_dp_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pan_can_dp_mmx; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_p_caa_dp_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pas_caa_dp_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pan_caa_dp_mmx; - - op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_p_c_dpan_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pas_c_dpan_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pan_c_dpan_mmx; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_p_can_dpan_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pas_can_dpan_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pan_can_dpan_mmx; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_p_caa_dpan_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pas_caa_dpan_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pan_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_rel_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm3, mm0) - MOV_A2R(ALPHA_255, mm5) - MOV_PA2R(*d, mm1) - MOV_P2R(s, mm2, mm0) - MUL4_SYM_R2R(mm3, mm2, mm5); - MUL4_SYM_R2R(mm2, mm1, mm5); - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_copy_rel_pt_pas_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_pan_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_p_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_pas_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_pan_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_p_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_pas_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx -#define _op_copy_rel_pt_pan_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx - -#define _op_copy_rel_pt_p_c_dpan_mmx _op_copy_pt_p_c_dpan_mmx -#define _op_copy_rel_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dpan_mmx -#define _op_copy_rel_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dpan_mmx -#define _op_copy_rel_pt_p_can_dpan_mmx _op_copy_pt_p_can_dpan_mmx -#define _op_copy_rel_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dpan_mmx -#define _op_copy_rel_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dpan_mmx -#define _op_copy_rel_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dpan_mmx -#define _op_copy_rel_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dpan_mmx -#define _op_copy_rel_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dpan_mmx - - -static void -init_copy_rel_pixel_color_pt_funcs_mmx(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_p_c_dp_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pas_c_dp_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pan_c_dp_mmx; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_p_can_dp_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pas_can_dp_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pan_can_dp_mmx; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_p_caa_dp_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pas_caa_dp_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pan_caa_dp_mmx; - - op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_c_dpan_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_c_dpan_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_c_dpan_mmx; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_can_dpan_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_can_dpan_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_can_dpan_mmx; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_caa_dpan_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_caa_dpan_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c deleted file mode 100644 index f8a1e79..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c +++ /dev/null @@ -1,238 +0,0 @@ -/* copy pixel x color --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL4_SYM(c, *s); - d++; - s++; - }); -} - - -static void -_op_copy_p_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it - // FIXME: neon-it - DATA32 *e; - c = 1 + (c >> 24); - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_256(c, *s); - d++; - s++; - }); -} - - -#define _op_copy_pas_c_dp_neon _op_copy_p_c_dp_neon -#define _op_copy_pan_c_dp_neon _op_copy_p_c_dp_neon -#define _op_copy_p_can_dp_neon _op_copy_p_c_dp_neon -#define _op_copy_pas_can_dp_neon _op_copy_pas_c_dp_neon -#define _op_copy_pan_can_dp_neon _op_copy_pan_c_dp_neon -#define _op_copy_pas_caa_dp_neon _op_copy_p_caa_dp_neon -#define _op_copy_pan_caa_dp_neon _op_copy_p_caa_dp_neon - -#define _op_copy_p_c_dpan_neon _op_copy_p_c_dp_neon -#define _op_copy_pas_c_dpan_neon _op_copy_pas_c_dp_neon -#define _op_copy_pan_c_dpan_neon _op_copy_pan_c_dp_neon -#define _op_copy_p_can_dpan_neon _op_copy_p_can_dp_neon -#define _op_copy_pas_can_dpan_neon _op_copy_pas_can_dp_neon -#define _op_copy_pan_can_dpan_neon _op_copy_pan_can_dp_neon -#define _op_copy_p_caa_dpan_neon _op_copy_p_caa_dp_neon -#define _op_copy_pas_caa_dpan_neon _op_copy_pas_caa_dp_neon -#define _op_copy_pan_caa_dpan_neon _op_copy_pan_caa_dp_neon - -static void -init_copy_pixel_color_span_funcs_neon(void) -{ - op_copy_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_p_c_dp_neon; - op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pas_c_dp_neon; - op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pan_c_dp_neon; - op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_p_can_dp_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pas_can_dp_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pan_can_dp_neon; - op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_p_caa_dp_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pas_caa_dp_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pan_caa_dp_neon; - - op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_p_c_dpan_neon; - op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pas_c_dpan_neon; - op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pan_c_dpan_neon; - op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_p_can_dpan_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pas_can_dpan_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pan_can_dpan_neon; - op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_p_caa_dpan_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pas_caa_dpan_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pan_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = MUL4_SYM(c, s); -} - -#define _op_copy_pt_pas_c_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pan_c_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_p_can_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pas_can_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pan_can_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_p_caa_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pas_caa_dp_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pan_caa_dp_neon _op_copy_pt_p_c_dp_neon - -#define _op_copy_pt_p_c_dpan_neon _op_copy_pt_p_c_dp_neon -#define _op_copy_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dp_neon -#define _op_copy_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dp_neon -#define _op_copy_pt_p_can_dpan_neon _op_copy_pt_p_can_dp_neon -#define _op_copy_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dp_neon -#define _op_copy_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dp_neon -#define _op_copy_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dp_neon -#define _op_copy_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dp_neon -#define _op_copy_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dp_neon - -static void -init_copy_pixel_color_pt_funcs_neon(void) -{ - op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_p_c_dp_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pas_c_dp_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pan_c_dp_neon; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_p_can_dp_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pas_can_dp_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pan_can_dp_neon; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_p_caa_dp_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pas_caa_dp_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pan_caa_dp_neon; - - op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_p_c_dpan_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pas_c_dpan_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pan_c_dpan_neon; - op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_p_can_dpan_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pas_can_dpan_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pan_can_dpan_neon; - op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_p_caa_dpan_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pas_caa_dpan_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pan_caa_dpan_neon; -} -#endif - -/*-----*/ - -/* copy_rel pixel x color --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_rel_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - DATA32 cs = MUL4_SYM(c, *s); - *d = MUL_SYM(*d >> 24, cs); - d++; - s++; - }); -} - - -#define _op_copy_rel_pas_c_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_pan_c_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_p_can_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_pas_can_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_pan_can_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_p_caa_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_pas_caa_dp_neon _op_copy_rel_p_c_dp_neon -#define _op_copy_rel_pan_caa_dp_neon _op_copy_rel_p_c_dp_neon - -#define _op_copy_rel_p_c_dpan_neon _op_copy_p_c_dpan_neon -#define _op_copy_rel_pas_c_dpan_neon _op_copy_pas_c_dpan_neon -#define _op_copy_rel_pan_c_dpan_neon _op_copy_pan_c_dpan_neon -#define _op_copy_rel_p_can_dpan_neon _op_copy_p_can_dpan_neon -#define _op_copy_rel_pas_can_dpan_neon _op_copy_pas_can_dpan_neon -#define _op_copy_rel_pan_can_dpan_neon _op_copy_pan_can_dpan_neon -#define _op_copy_rel_p_caa_dpan_neon _op_copy_p_caa_dpan_neon -#define _op_copy_rel_pas_caa_dpan_neon _op_copy_pas_caa_dpan_neon -#define _op_copy_rel_pan_caa_dpan_neon _op_copy_pan_caa_dpan_neon - -static void -init_copy_rel_pixel_color_span_funcs_neon(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_p_c_dp_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pas_c_dp_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pan_c_dp_neon; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_p_can_dp_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pas_can_dp_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pan_can_dp_neon; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_p_caa_dp_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pas_caa_dp_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pan_caa_dp_neon; - - op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_p_c_dpan_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pas_c_dpan_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pan_c_dpan_neon; - op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_p_can_dpan_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pas_can_dpan_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pan_can_dpan_neon; - op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_p_caa_dpan_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pas_caa_dpan_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pan_caa_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_rel_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - *d = MUL_SYM(*d >> 24, s); -} - - -#define _op_copy_rel_pt_pas_c_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_pan_c_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_p_can_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_pas_can_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_pan_can_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_p_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_pas_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon -#define _op_copy_rel_pt_pan_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon - -#define _op_copy_rel_pt_p_c_dpan_neon _op_copy_pt_p_c_dpan_neon -#define _op_copy_rel_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dpan_neon -#define _op_copy_rel_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dpan_neon -#define _op_copy_rel_pt_p_can_dpan_neon _op_copy_pt_p_can_dpan_neon -#define _op_copy_rel_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dpan_neon -#define _op_copy_rel_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dpan_neon -#define _op_copy_rel_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dpan_neon -#define _op_copy_rel_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dpan_neon -#define _op_copy_rel_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dpan_neon - - -static void -init_copy_rel_pixel_color_pt_funcs_neon(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_p_c_dp_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pas_c_dp_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pan_c_dp_neon; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_p_can_dp_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pas_can_dp_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pan_can_dp_neon; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_p_caa_dp_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pas_caa_dp_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pan_caa_dp_neon; - - op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_c_dpan_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_c_dpan_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_c_dpan_neon; - op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_can_dpan_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_can_dpan_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_can_dpan_neon; - op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_caa_dpan_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_caa_dpan_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_caa_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c deleted file mode 100644 index b03022b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c +++ /dev/null @@ -1,131 +0,0 @@ -/* copy pixel --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l - 15; - for (; d < e; d+=16, s+=16) { - MOVE_16DWORDS_MMX(s, d); - } - e+=15; - for (; d < e; d++, s++) { - *d = *s; - } -} - -#define _op_copy_pan_dp_mmx _op_copy_p_dp_mmx -#define _op_copy_pas_dp_mmx _op_copy_p_dp_mmx - -#define _op_copy_p_dpan_mmx _op_copy_p_dp_mmx -#define _op_copy_pan_dpan_mmx _op_copy_pan_dp_mmx -#define _op_copy_pas_dpan_mmx _op_copy_pas_dp_mmx - -static void -init_copy_pixel_span_funcs_mmx(void) -{ - op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_p_dp_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pan_dp_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pas_dp_mmx; - - op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_p_dpan_mmx; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_dpan_mmx; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = s; -} - -#define _op_copy_pt_pan_dp_mmx _op_copy_pt_p_dp_mmx -#define _op_copy_pt_pas_dp_mmx _op_copy_pt_p_dp_mmx - -#define _op_copy_pt_p_dpan_mmx _op_copy_pt_p_dp_mmx -#define _op_copy_pt_pan_dpan_mmx _op_copy_pt_pan_dp_mmx -#define _op_copy_pt_pas_dpan_mmx _op_copy_pt_pas_dp_mmx - -static void -init_copy_pixel_pt_funcs_mmx(void) -{ - op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_p_dp_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_dp_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_dp_mmx; - - op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_dpan_mmx; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_dpan_mmx; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_dpan_mmx; -} -#endif - -/*-----*/ - -/* copy_rel pixel --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - for (; d < e; d++, s++) { - MOV_PA2R(*d, mm1) - MOV_P2R(*s, mm2, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - } -} - - -#define _op_copy_rel_pas_dp_mmx _op_copy_rel_p_dp_mmx -#define _op_copy_rel_pan_dp_mmx _op_copy_rel_p_dp_mmx - -#define _op_copy_rel_p_dpan_mmx _op_copy_p_dpan_mmx -#define _op_copy_rel_pan_dpan_mmx _op_copy_pan_dpan_mmx -#define _op_copy_rel_pas_dpan_mmx _op_copy_pas_dpan_mmx - -static void -init_copy_rel_pixel_span_funcs_mmx(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_p_dp_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_dp_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_dp_mmx; - - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_dpan_mmx; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_dpan_mmx; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 1 + (*d >> 24); - MOV_A2R(c, mm1) - pxor_r2r(mm0, mm0); - MOV_P2R(s, mm2, mm0) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_copy_rel_pt_pan_dp_mmx _op_copy_rel_pt_p_dp_mmx -#define _op_copy_rel_pt_pas_dp_mmx _op_copy_rel_pt_p_dp_mmx - -#define _op_copy_rel_pt_p_dpan_mmx _op_copy_pt_p_dpan_mmx -#define _op_copy_rel_pt_pan_dpan_mmx _op_copy_pt_pan_dpan_mmx -#define _op_copy_rel_pt_pas_dpan_mmx _op_copy_pt_pas_dpan_mmx - -static void -init_copy_rel_pixel_pt_funcs_mmx(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_dp_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_dp_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_dp_mmx; - - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_dpan_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_dpan_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c deleted file mode 100644 index 48b5338..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c +++ /dev/null @@ -1,150 +0,0 @@ -/* copy pixel x mask --> dst */ - -#ifdef BUILD_C -static void -_op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - color++; - *d = INTERP_256(color, *s, *d); - break; - } - m++; s++; d++; - }); -} - - -#define _op_copy_pan_mas_dp _op_copy_p_mas_dp -#define _op_copy_pas_mas_dp _op_copy_p_mas_dp - -#define _op_copy_p_mas_dpan _op_copy_p_mas_dp -#define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan -#define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan - -static void -init_copy_pixel_mask_span_funcs_c(void) -{ - op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp; - - op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { - *d = INTERP_256(m + 1, s, *d); -} - -#define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp -#define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp - -#define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp -#define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan -#define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan - -static void -init_copy_pixel_mask_pt_funcs_c(void) -{ - op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp; - - op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan; -} -#endif - -/*-----*/ - -/* copy_rel pixel x mask --> dst */ - -#ifdef BUILD_C -static void -_op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = MUL_SYM(*d >> 24, *s); - break; - default: - c = MUL_SYM(*d >> 24, *s); - l++; - *d = INTERP_256(l, c, *d); - break; - } - m++; s++; d++; - }); -} - - -#define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp -#define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp - -#define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan -#define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan -#define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan - -static void -init_copy_rel_pixel_mask_span_funcs_c(void) -{ - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp; - - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = MUL_SYM(*d >> 24, s); - *d = INTERP_256(m + 1, c, *d); -} - - -#define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp -#define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp - -#define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan -#define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan -#define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan - -static void -init_copy_rel_pixel_mask_pt_funcs_c(void) -{ - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp; - - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c deleted file mode 100644 index 2511c41..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c +++ /dev/null @@ -1,176 +0,0 @@ -/* copy pixel x mask --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - l++; - MOV_A2R(l, mm3) - MOV_P2R(*s, mm2, mm0) - MOV_P2R(*d, mm1, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5); - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -#define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx -#define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx - -#define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx -#define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx -#define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx - -static void -init_copy_pixel_mask_span_funcs_mmx(void) -{ - op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx; - - op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = m + 1; - MOV_A2R(ALPHA_255, mm5) - MOV_A2R(c, mm3) - pxor_r2r(mm0, mm0); - MOV_P2R(s, mm2, mm0) - MOV_P2R(*d, mm1, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5); - MOV_R2P(mm1, *d, mm0) -} - -#define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx -#define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx - -#define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx -#define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx -#define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx - -static void -init_copy_pixel_mask_pt_funcs_mmx(void) -{ - op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx; - - op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx; -} -#endif - -/*-----*/ - -/* copy_rel pixel x mask --> dst */ - -#ifdef BUILD_MMX -static void -_op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - MOV_P2R(*s, mm2, mm0) - MOV_PA2R(*d, mm1) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - default: - l++; - MOV_P2R(*s, mm3, mm0) - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm2) - MUL4_SYM_R2R(mm3, mm2, mm5) - MOV_A2R(l, mm3) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - m++; s++; d++; - } -} - -#define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx -#define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx - -#define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx -#define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx -#define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx - -static void -init_copy_rel_pixel_mask_span_funcs_mmx(void) -{ - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx; - - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = m + 1; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(s, mm3, mm0) - MOV_P2R(*d, mm1, mm0) - MOV_RA2R(mm1, mm2) - MUL4_SYM_R2R(mm3, mm2, mm5) - MOV_A2R(c, mm3) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - - -#define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx -#define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx - -#define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx -#define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx -#define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx - -static void -init_copy_rel_pixel_mask_pt_funcs_mmx(void) -{ - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx; - - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx; -} -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c deleted file mode 100644 index e25f8f8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c +++ /dev/null @@ -1,151 +0,0 @@ -/* copy pixel x mask --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = *s; - break; - default: - color++; - *d = INTERP_256(color, *s, *d); - break; - } - m++; s++; d++; - }); -} - -#define _op_copy_pan_mas_dp_neon _op_copy_p_mas_dp_neon -#define _op_copy_pas_mas_dp_neon _op_copy_p_mas_dp_neon - -#define _op_copy_p_mas_dpan_neon _op_copy_p_mas_dp_neon -#define _op_copy_pan_mas_dpan_neon _op_copy_p_mas_dpan_neon -#define _op_copy_pas_mas_dpan_neon _op_copy_p_mas_dpan_neon - -static void -init_copy_pixel_mask_span_funcs_neon(void) -{ - op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_p_mas_dp_neon; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pan_mas_dp_neon; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pas_mas_dp_neon; - - op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_p_mas_dpan_neon; - op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_mas_dpan_neon; - op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_mas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - *d = INTERP_256(m + 1, s, *d); -} - -#define _op_copy_pt_pan_mas_dp_neon _op_copy_pt_p_mas_dp_neon -#define _op_copy_pt_pas_mas_dp_neon _op_copy_pt_p_mas_dp_neon - -#define _op_copy_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dp_neon -#define _op_copy_pt_pan_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon -#define _op_copy_pt_pas_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon - -static void -init_copy_pixel_mask_pt_funcs_neon(void) -{ - op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_p_mas_dp_neon; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_mas_dp_neon; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_mas_dp_neon; - - op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_mas_dpan_neon; - op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_mas_dpan_neon; - op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_mas_dpan_neon; -} -#endif - -/*-----*/ - -/* copy_rel pixel x mask --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - int color; - UNROLL8_PLD_WHILE(d, l, e, - { - color = *m; - switch(color) - { - case 0: - break; - case 255: - *d = MUL_SYM(*d >> 24, *s); - break; - default: - c = MUL_SYM(*d >> 24, *s); - l++; - *d = INTERP_256(l, c, *d); - break; - } - m++; s++; d++; - }); -} - -#define _op_copy_rel_pan_mas_dp_neon _op_copy_rel_p_mas_dp_neon -#define _op_copy_rel_pas_mas_dp_neon _op_copy_rel_p_mas_dp_neon - -#define _op_copy_rel_p_mas_dpan_neon _op_copy_p_mas_dpan_neon -#define _op_copy_rel_pan_mas_dpan_neon _op_copy_pan_mas_dpan_neon -#define _op_copy_rel_pas_mas_dpan_neon _op_copy_pas_mas_dpan_neon - -static void -init_copy_rel_pixel_mask_span_funcs_neon(void) -{ - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_p_mas_dp_neon; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_mas_dp_neon; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_mas_dp_neon; - - op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_mas_dpan_neon; - op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_mas_dpan_neon; - op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_mas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - c = MUL_SYM(*d >> 24, s); - *d = INTERP_256(m + 1, c, *d); -} - - -#define _op_copy_rel_pt_pan_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon -#define _op_copy_rel_pt_pas_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon - -#define _op_copy_rel_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon -#define _op_copy_rel_pt_pan_mas_dpan_neon _op_copy_pt_pan_mas_dpan_neon -#define _op_copy_rel_pt_pas_mas_dpan_neon _op_copy_pt_pas_mas_dpan_neon - -static void -init_copy_rel_pixel_mask_pt_funcs_neon(void) -{ - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_mas_dp_neon; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_mas_dp_neon; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_mas_dp_neon; - - op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_mas_dpan_neon; - op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_mas_dpan_neon; - op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_mas_dpan_neon; -} -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c deleted file mode 100644 index 5b8bd60..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c +++ /dev/null @@ -1,158 +0,0 @@ -/* copy pixel --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { -//#define USENEON 1 -#ifndef USENEON - memcpy(d, s, l * sizeof(DATA32)); - return; -#else - DATA32 *e; - e = d + l - 23; - if (e > d) - { - int dl; - - asm volatile - (".fpu neon \n\t" - "_op_copy_p_dp_neon_asmloop: \n\t" - "pld [%[s], #192] \n\t" // preload 256 bytes ahead - "pld [%[s], #320] \n\t" // preload 320 bytes ahead - "vld1.32 {d0-d3}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned - "vld1.32 {d4-d7} , [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned - "vld1.32 {d8-d11}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned - "vst1.32 {d0-d3}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned - "vst1.32 {d4-d7}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned - "vst1.32 {d8-d11}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned - "cmp %[e], %[d] \n\t" // compare current and end ptr - "bgt _op_copy_p_dp_neon_asmloop \n\t" - : /*out*/ - : /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d) - : /*clobber*/ - "q0", "q1", "q2","q3", "q4", "q5", "q6", - "d0", "d1", "d2", "d3", - "d4", "d5", "d6", "d7", - "d8", "d9", "d10", "d11", - "memory" // clobbered - ); - dl = l % 24; // dl is how many pixels at end that is not a multiple of 24 - l = l - dl; // jump to there at the end of the run? - s = s + l; - d = d + l; - } - e += 23; - for (;d < e; d++, s++) *d = *s; -#endif -} - -#define _op_copy_pan_dp_neon _op_copy_p_dp_neon -#define _op_copy_pas_dp_neon _op_copy_p_dp_neon - -#define _op_copy_p_dpan_neon _op_copy_p_dp_neon -#define _op_copy_pan_dpan_neon _op_copy_pan_dp_neon -#define _op_copy_pas_dpan_neon _op_copy_pas_dp_neon - -static void -init_copy_pixel_span_funcs_neon(void) -{ - op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_p_dp_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pan_dp_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pas_dp_neon; - - op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_p_dpan_neon; - op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_dpan_neon; - op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = s; -} - -#define _op_copy_pt_pan_dp_neon _op_copy_pt_p_dp_neon -#define _op_copy_pt_pas_dp_neon _op_copy_pt_p_dp_neon - -#define _op_copy_pt_p_dpan_neon _op_copy_pt_p_dp_neon -#define _op_copy_pt_pan_dpan_neon _op_copy_pt_pan_dp_neon -#define _op_copy_pt_pas_dpan_neon _op_copy_pt_pas_dp_neon - -static void -init_copy_pixel_pt_funcs_neon(void) -{ - op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_p_dp_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_dp_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_dp_neon; - - op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_dpan_neon; - op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_dpan_neon; - op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_dpan_neon; -} -#endif - -/*-----*/ - -/* copy_rel pixel --> dst */ - -#ifdef BUILD_NEON -static void -_op_copy_rel_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - // FIXME: neon-it - DATA32 *e; - UNROLL8_PLD_WHILE(d, l, e, - { - *d = MUL_SYM(*d >> 24, c); - d++; - }); -} - - -#define _op_copy_rel_pas_dp_neon _op_copy_rel_p_dp_neon -#define _op_copy_rel_pan_dp_neon _op_copy_rel_p_dp_neon - -#define _op_copy_rel_p_dpan_neon _op_copy_p_dpan_neon -#define _op_copy_rel_pan_dpan_neon _op_copy_pan_dpan_neon -#define _op_copy_rel_pas_dpan_neon _op_copy_pas_dpan_neon - -static void -init_copy_rel_pixel_span_funcs_neon(void) -{ - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_p_dp_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_dp_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_dp_neon; - - op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_dpan_neon; - op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_dpan_neon; - op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_dpan_neon; -} -#endif - -#ifdef BUILD_NEON -static void -_op_copy_rel_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = 1 + (*d >> 24); - *d = MUL_256(s, c); -} - - -#define _op_copy_rel_pt_pan_dp_neon _op_copy_rel_pt_p_dp_neon -#define _op_copy_rel_pt_pas_dp_neon _op_copy_rel_pt_p_dp_neon - -#define _op_copy_rel_pt_p_dpan_neon _op_copy_pt_p_dpan_neon -#define _op_copy_rel_pt_pan_dpan_neon _op_copy_pt_pan_dpan_neon -#define _op_copy_rel_pt_pas_dpan_neon _op_copy_pt_pas_dpan_neon - -static void -init_copy_rel_pixel_pt_funcs_neon(void) -{ - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_dp_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_dp_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_dp_neon; - - op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_dpan_neon; - op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_dpan_neon; - op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_dpan_neon; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c deleted file mode 100644 index 4575aee..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c +++ /dev/null @@ -1,675 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - -static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_copy_init(void); -static void op_copy_shutdown(void); - -static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_copy = { "copy", - op_copy_init, op_copy_shutdown, - op_copy_pixel_span_get, op_copy_color_span_get, - op_copy_pixel_color_span_get, op_copy_mask_color_span_get, - op_copy_pixel_mask_span_get, - op_copy_pixel_pt_get, op_copy_color_pt_get, - op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get, - op_copy_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_copy_get(void) -{ - return &(_composite_copy); -} - - -static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_copy_rel_init(void); -static void op_copy_rel_shutdown(void); - -static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -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: 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); -static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel", - op_copy_rel_init, op_copy_rel_shutdown, - op_copy_rel_pixel_span_get, op_copy_rel_color_span_get, - op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get, - op_copy_rel_pixel_mask_span_get, - op_copy_rel_pixel_pt_get, op_copy_color_pt_get, - op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get, - op_copy_rel_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_copy_rel_get(void) -{ - return &(_composite_copy_rel); -} - - -# include "./evas_op_copy/op_copy_pixel_.c" -# include "./evas_op_copy/op_copy_color_.c" -# include "./evas_op_copy/op_copy_pixel_color_.c" -# include "./evas_op_copy/op_copy_pixel_mask_.c" -# include "./evas_op_copy/op_copy_mask_color_.c" -//# include "./evas_op_copy/op_copy_pixel_mask_color_.c" - -# include "./evas_op_copy/op_copy_pixel_i386.c" -# include "./evas_op_copy/op_copy_color_i386.c" -# include "./evas_op_copy/op_copy_pixel_color_i386.c" -# include "./evas_op_copy/op_copy_pixel_mask_i386.c" -# include "./evas_op_copy/op_copy_mask_color_i386.c" -//# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c" - -# include "./evas_op_copy/op_copy_pixel_neon.c" -# include "./evas_op_copy/op_copy_color_neon.c" -# include "./evas_op_copy/op_copy_pixel_color_neon.c" -# include "./evas_op_copy/op_copy_pixel_mask_neon.c" -# include "./evas_op_copy/op_copy_mask_color_neon.c" -//# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c" - - -static void -op_copy_init(void) -{ - memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs)); - memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs)); -#ifdef BUILD_MMX - init_copy_pixel_span_funcs_mmx(); - init_copy_pixel_color_span_funcs_mmx(); - init_copy_pixel_mask_span_funcs_mmx(); - init_copy_color_span_funcs_mmx(); - init_copy_mask_color_span_funcs_mmx(); - - init_copy_pixel_pt_funcs_mmx(); - init_copy_pixel_color_pt_funcs_mmx(); - init_copy_pixel_mask_pt_funcs_mmx(); - init_copy_color_pt_funcs_mmx(); - init_copy_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_NEON - init_copy_pixel_span_funcs_neon(); - init_copy_pixel_color_span_funcs_neon(); - init_copy_pixel_mask_span_funcs_neon(); - init_copy_color_span_funcs_neon(); - init_copy_mask_color_span_funcs_neon(); - - init_copy_pixel_pt_funcs_neon(); - init_copy_pixel_color_pt_funcs_neon(); - init_copy_pixel_mask_pt_funcs_neon(); - init_copy_color_pt_funcs_neon(); - init_copy_mask_color_pt_funcs_neon(); -#endif -#ifdef BUILD_C - init_copy_pixel_span_funcs_c(); - init_copy_pixel_color_span_funcs_c(); - init_copy_pixel_mask_span_funcs_c(); - init_copy_color_span_funcs_c(); - init_copy_mask_color_span_funcs_c(); - - init_copy_pixel_pt_funcs_c(); - init_copy_pixel_color_pt_funcs_c(); - init_copy_pixel_mask_pt_funcs_c(); - init_copy_color_pt_funcs_c(); - init_copy_mask_color_pt_funcs_c(); -#endif -} - -static void -op_copy_shutdown(void) -{ -} - -static RGBA_Gfx_Func -copy_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_copy_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_copy_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_copy_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return copy_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src && src->cache_entry.flags.alpha) - s = SP; - return copy_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -copy_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_copy_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_copy_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_copy_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return copy_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src_flags.alpha) - s = SP; - return copy_gfx_pt_func_cpu(s, m, c, d); -} - - -static void -op_copy_rel_init(void) -{ - memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs)); - memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs)); -#ifdef BUILD_MMX - init_copy_rel_pixel_span_funcs_mmx(); - init_copy_rel_pixel_color_span_funcs_mmx(); - init_copy_rel_pixel_mask_span_funcs_mmx(); - init_copy_rel_color_span_funcs_mmx(); - init_copy_rel_mask_color_span_funcs_mmx(); - - init_copy_rel_pixel_pt_funcs_mmx(); - init_copy_rel_pixel_color_pt_funcs_mmx(); - init_copy_rel_pixel_mask_pt_funcs_mmx(); - init_copy_rel_color_pt_funcs_mmx(); - init_copy_rel_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_NEON - init_copy_rel_pixel_span_funcs_neon(); - init_copy_rel_pixel_color_span_funcs_neon(); - init_copy_rel_pixel_mask_span_funcs_neon(); - init_copy_rel_color_span_funcs_neon(); - init_copy_rel_mask_color_span_funcs_neon(); - - init_copy_rel_pixel_pt_funcs_neon(); - init_copy_rel_pixel_color_pt_funcs_neon(); - init_copy_rel_pixel_mask_pt_funcs_neon(); - init_copy_rel_color_pt_funcs_neon(); - init_copy_rel_mask_color_pt_funcs_neon(); -#endif -#ifdef BUILD_C - init_copy_rel_pixel_span_funcs_c(); - init_copy_rel_pixel_color_span_funcs_c(); - init_copy_rel_pixel_mask_span_funcs_c(); - init_copy_rel_color_span_funcs_c(); - init_copy_rel_mask_color_span_funcs_c(); - - init_copy_rel_pixel_pt_funcs_c(); - init_copy_rel_pixel_color_pt_funcs_c(); - init_copy_rel_pixel_mask_pt_funcs_c(); - init_copy_rel_color_pt_funcs_c(); - init_copy_rel_mask_color_pt_funcs_c(); -#endif -} - -static void -op_copy_rel_shutdown(void) -{ -} - -static RGBA_Gfx_Func -copy_rel_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_copy_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_copy_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_copy_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return copy_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src && src->cache_entry.flags.alpha) - s = SP; - return copy_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_NEON - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) - { - cpu = CPU_NEON; - func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_pt_func_cpu(s, m, c, d); -} - -/* XXX: not used -static RGBA_Gfx_Pt_Func -op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_pt_func_cpu(s, m, c, d); -} -*/ - -static RGBA_Gfx_Pt_Func -op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return copy_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == ((col >> 24) * 0x01010101)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return copy_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src_flags.alpha) - s = SP; - return copy_rel_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am deleted file mode 100644 index 47eefd2..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_mask_color_.c \ -op_mask_color_i386.c \ -op_mask_mask_color_.c \ -op_mask_mask_color_i386.c \ -op_mask_pixel_.c \ -op_mask_pixel_color_.c \ -op_mask_pixel_color_i386.c \ -op_mask_pixel_i386.c \ -op_mask_pixel_mask_.c \ -op_mask_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in deleted file mode 100644 index 00b536a..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_mask -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_mask_color_.c \ -op_mask_color_i386.c \ -op_mask_mask_color_.c \ -op_mask_mask_color_i386.c \ -op_mask_pixel_.c \ -op_mask_pixel_color_.c \ -op_mask_pixel_color_i386.c \ -op_mask_pixel_i386.c \ -op_mask_pixel_mask_.c \ -op_mask_pixel_mask_i386.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c deleted file mode 100644 index c95b125..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c +++ /dev/null @@ -1,49 +0,0 @@ -/* mask color --> dst */ - -#ifdef BUILD_C -static void -_op_mask_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - for (; d < e; d++) { - *d = MUL_256(c, *d); - } -} - -#define _op_mask_caa_dp _op_mask_c_dp - -#define _op_mask_c_dpan _op_mask_c_dp -#define _op_mask_caa_dpan _op_mask_caa_dp - -static void -init_mask_color_span_funcs_c(void) -{ - op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_c_dp; - op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_caa_dp; - - op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_c_dpan; - op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mask_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = MUL_SYM(c >> 24, *d); -} - -#define _op_mask_pt_caa_dp _op_mask_pt_c_dp - -#define _op_mask_pt_c_dpan _op_mask_pt_c_dp -#define _op_mask_pt_caa_dpan _op_mask_pt_caa_dp - -static void -init_mask_color_pt_funcs_c(void) -{ - op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_pt_c_dp; - op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_caa_dp; - - op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_c_dpan; - op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c deleted file mode 100644 index 9635eac..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c +++ /dev/null @@ -1,58 +0,0 @@ -/* mask color --> dst */ - -#ifdef BUILD_MMX -static void -_op_mask_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - MOV_A2R(c, mm2) - pxor_r2r(mm0, mm0); - for (; d < e; d++) { - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) - } -} - -#define _op_mask_caa_dp_mmx _op_mask_c_dp_mmx - -#define _op_mask_c_dpan_mmx _op_mask_c_dp_mmx -#define _op_mask_caa_dpan_mmx _op_mask_caa_dp_mmx - -static void -init_mask_color_span_funcs_mmx(void) -{ - op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_c_dp_mmx; - op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_caa_dp_mmx; - - op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_c_dpan_mmx; - op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mask_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 1 + (c >> 24); - MOV_A2R(c, mm2) - pxor_r2r(mm0, mm0); - MOV_P2R(*d, mm1, mm0) - MUL4_256_R2R(mm2, mm1) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mask_pt_caa_dp_mmx _op_mask_pt_c_dp_mmx - -#define _op_mask_pt_c_dpan_mmx _op_mask_pt_c_dp_mmx -#define _op_mask_pt_caa_dpan_mmx _op_mask_pt_caa_dp_mmx - -static void -init_mask_color_pt_funcs_mmx(void) -{ - op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_pt_c_dp_mmx; - op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_pt_caa_dp_mmx; - - op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_pt_c_dpan_mmx; - op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_pt_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c deleted file mode 100644 index c75edb4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c +++ /dev/null @@ -1,63 +0,0 @@ -/* mask mask x color -> dst */ - -#ifdef BUILD_C -static void -_op_mask_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = MUL_256(c, *d); - break; - default: - l = 256 - (((257 - c) * l) >> 8); - *d = MUL_256(l, *d); - break; - } - m++; d++; - } -} - -#define _op_mask_mas_caa_dp _op_mask_mas_c_dp - -#define _op_mask_mas_c_dpan _op_mask_mas_c_dp -#define _op_mask_mas_caa_dpan _op_mask_mas_caa_dp - -static void -init_mask_mask_color_span_funcs_c(void) -{ - op_mask_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_mas_c_dp; - op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_mas_caa_dp; - - op_mask_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_mas_c_dpan; - op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mask_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { - c = 256 - (((256 - (c >> 24)) * m) >> 8); - *d = MUL_256(c, *d); -} - -#define _op_mask_pt_mas_caa_dp _op_mask_pt_mas_c_dp - -#define _op_mask_pt_mas_c_dpan _op_mask_pt_mas_c_dp -#define _op_mask_pt_mas_caa_dpan _op_mask_pt_mas_caa_dp - -static void -init_mask_mask_color_pt_funcs_c(void) -{ - op_mask_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_pt_mas_c_dp; - op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_pt_mas_caa_dp; - - op_mask_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_pt_mas_c_dpan; - op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_pt_mas_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c deleted file mode 100644 index 9427dbf..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c +++ /dev/null @@ -1,13 +0,0 @@ -/* mask mask x color -> dst */ - -#ifdef BUILD_MMX -static void -init_mask_mask_color_span_funcs_mmx(void) -{} -#endif - -#ifdef BUILD_MMX -static void -init_mask_mask_color_pt_funcs_mmx(void) -{} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c deleted file mode 100644 index ea7982b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c +++ /dev/null @@ -1,48 +0,0 @@ -/* mask pixel --> dst */ - -#ifdef BUILD_C -static void -_op_mask_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - for (; d < e; d++, s++) { - *d = MUL_SYM(*s >> 24, *d); - } -} - -#define _op_mask_pas_dp _op_mask_p_dp - -#define _op_mask_p_dpan _op_mask_p_dp -#define _op_mask_pas_dpan _op_mask_pas_dp - -static void -init_mask_pixel_span_funcs_c(void) -{ - op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp; - op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp; - - op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan; - op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mask_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = MUL_SYM(s >> 24, *d); -} - -#define _op_mask_pt_pas_dp _op_mask_pt_p_dp - -#define _op_mask_pt_p_dpan _op_mask_pt_p_dp -#define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp - -static void -init_mask_pixel_pt_funcs_c(void) -{ - op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp; - op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp; - - op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan; - op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c deleted file mode 100644 index 18d1cab..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c +++ /dev/null @@ -1,100 +0,0 @@ -/* mask pixel x color --> dst */ - -#ifdef BUILD_C -static void -_op_mask_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - l = 1 + (c >> 24); - while (d < e) { - c = 1 + ((l * (*s >> 24)) >> 8); - *d = MUL_256(c, *d); - s++; d++; - } -} - -#define _op_mask_pas_c_dp _op_mask_p_c_dp -#define _op_mask_pan_c_dp _op_mask_p_c_dp -#define _op_mask_p_can_dp _op_mask_p_c_dp -#define _op_mask_pas_can_dp _op_mask_p_c_dp -#define _op_mask_p_caa_dp _op_mask_p_c_dp -#define _op_mask_pas_caa_dp _op_mask_p_c_dp -#define _op_mask_pan_caa_dp _op_mask_p_c_dp - -#define _op_mask_p_c_dpan _op_mask_p_c_dp -#define _op_mask_pas_c_dpan _op_mask_p_c_dp -#define _op_mask_pan_c_dpan _op_mask_p_c_dp -#define _op_mask_p_can_dpan _op_mask_p_c_dp -#define _op_mask_pas_can_dpan _op_mask_p_c_dp -#define _op_mask_p_caa_dpan _op_mask_p_c_dp -#define _op_mask_pas_caa_dpan _op_mask_p_c_dp -#define _op_mask_pan_caa_dpan _op_mask_p_c_dp - -static void -init_mask_pixel_color_span_funcs_c(void) -{ - op_mask_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_p_c_dp; - op_mask_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pas_c_dp; - op_mask_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pan_c_dp; - op_mask_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_p_can_dp; - op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pas_can_dp; - op_mask_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_p_caa_dp; - op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pas_caa_dp; - op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pan_caa_dp; - - op_mask_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_p_c_dpan; - op_mask_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pas_c_dpan; - op_mask_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pan_c_dpan; - op_mask_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_p_can_dpan; - op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pas_can_dpan; - op_mask_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_p_caa_dpan; - op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pas_caa_dpan; - op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mask_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - c = 1 + ((((c >> 24) * (s >> 24)) + 255) >> 8); - *d = MUL_256(c, *d); -} - -#define _op_mask_pt_pas_c_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_pan_c_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_p_can_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_pas_can_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_p_caa_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_pas_caa_dp _op_mask_pt_p_c_dp -#define _op_mask_pt_pan_caa_dp _op_mask_pt_p_c_dp - -#define _op_mask_pt_p_c_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_pas_c_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_pan_c_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_p_can_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_pas_can_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_p_caa_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_pas_caa_dpan _op_mask_pt_p_c_dp -#define _op_mask_pt_pan_caa_dpan _op_mask_pt_p_c_dp - -static void -init_mask_pixel_color_pt_funcs_c(void) -{ - op_mask_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_pt_p_c_dp; - op_mask_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pt_pas_c_dp; - op_mask_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pt_pan_c_dp; - op_mask_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_p_can_dp; - op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_pas_can_dp; - op_mask_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_p_caa_dp; - op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pas_caa_dp; - op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pan_caa_dp; - - op_mask_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_p_c_dpan; - op_mask_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pas_c_dpan; - op_mask_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pan_c_dpan; - op_mask_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_p_can_dpan; - op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_pas_can_dpan; - op_mask_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_p_caa_dpan; - op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pas_caa_dpan; - op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pan_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c deleted file mode 100644 index 0afcb71..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c +++ /dev/null @@ -1,13 +0,0 @@ -/* mask pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -init_mask_pixel_color_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_mask_pixel_color_pt_funcs_mmx(void) -{ } -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c deleted file mode 100644 index a1c09af..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c +++ /dev/null @@ -1,58 +0,0 @@ -/* mask pixel --> dst */ - -#ifdef BUILD_MMX -static void -_op_mask_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - for (; d < e; d++) { - MOV_P2R(*d, mm1, mm0) - MOV_PA2R(*s, mm2) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - } -} - -#define _op_mask_pas_dp_mmx _op_mask_p_dp_mmx - -#define _op_mask_p_dpan_mmx _op_mask_p_dp_mmx -#define _op_mask_pas_dpan_mmx _op_mask_pas_dp_mmx - -static void -init_mask_pixel_span_funcs_mmx(void) -{ - op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_p_dp_mmx; - op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pas_dp_mmx; - - op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_p_dpan_mmx; - op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mask_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(*d, mm1, mm0) - MOV_PA2R(s, mm2) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mask_pt_pas_dp_mmx _op_mask_pt_p_dp_mmx - -#define _op_mask_pt_p_dpan_mmx _op_mask_pt_p_dp_mmx -#define _op_mask_pt_pas_dpan_mmx _op_mask_pt_pas_dp_mmx - -static void -init_mask_pixel_pt_funcs_mmx(void) -{ - op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_p_dp_mmx; - op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_pas_dp_mmx; - - op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_p_dpan_mmx; - op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_pas_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c deleted file mode 100644 index b948aa6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c +++ /dev/null @@ -1,62 +0,0 @@ -/* mask pixel x mask --> dst */ - -#ifdef BUILD_C -static void -_op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) { - l = *m; - switch(l) - { - case 0: - break; - case 255: - *d = MUL_SYM(*s >> 24, *d); - break; - default: - l = 256 - (((256 - (*s >> 24)) * l) >> 8); - *d = MUL_256(l, *d); - break; - } - m++; s++; d++; - } -} - -#define _op_mask_pas_mas_dp _op_mask_p_mas_dp - -#define _op_mask_p_mas_dpan _op_mask_p_mas_dp -#define _op_mask_pas_mas_dpan _op_mask_pas_mas_dp - -static void -init_mask_pixel_mask_span_funcs_c(void) -{ - op_mask_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_p_mas_dp; - op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pas_mas_dp; - - op_mask_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_p_mas_dpan; - op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { - s = 256 - (((256 - (s >> 24)) * m) >> 8); - *d = MUL_256(s, *d); -} - -#define _op_mask_pt_pas_mas_dp _op_mask_pt_p_mas_dp - -#define _op_mask_pt_p_mas_dpan _op_mask_pt_p_mas_dp -#define _op_mask_pt_pas_mas_dpan _op_mask_pt_pas_mas_dp - -static void -init_mask_pixel_mask_pt_funcs_c(void) -{ - op_mask_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_p_mas_dp; - op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_pas_mas_dp; - - op_mask_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_mas_dpan; - op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_mas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c deleted file mode 100644 index c5dd8da..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c +++ /dev/null @@ -1,13 +0,0 @@ -/* mask pixel x mask --> dst */ - -#ifdef BUILD_MMX -static void -init_mask_pixel_mask_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_mask_pixel_mask_pt_funcs_mmx(void) -{ } -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c deleted file mode 100644 index bbe497a..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c +++ /dev/null @@ -1,309 +0,0 @@ -#include "evas_common.h" - -static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_mask_init(void); -static void op_mask_shutdown(void); - -static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_mask = { "mask", - op_mask_init, op_mask_shutdown, - op_mask_pixel_span_get, op_mask_color_span_get, - op_mask_pixel_color_span_get, op_mask_mask_color_span_get, - op_mask_pixel_mask_span_get, - op_mask_pixel_pt_get, op_mask_color_pt_get, - op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get, - op_mask_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_mask_get(void) -{ - return &(_composite_mask); -} - - -# include "./evas_op_mask/op_mask_pixel_.c" -# include "./evas_op_mask/op_mask_color_.c" -# include "./evas_op_mask/op_mask_pixel_color_.c" -# include "./evas_op_mask/op_mask_pixel_mask_.c" -# include "./evas_op_mask/op_mask_mask_color_.c" -//# include "./evas_op_mask/op_mask_pixel_mask_color_.c" - -# include "./evas_op_mask/op_mask_pixel_i386.c" -# include "./evas_op_mask/op_mask_color_i386.c" -# include "./evas_op_mask/op_mask_pixel_color_i386.c" -# include "./evas_op_mask/op_mask_pixel_mask_i386.c" -# include "./evas_op_mask/op_mask_mask_color_i386.c" -//# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c" - - -static void -op_mask_init(void) -{ - memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs)); - memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs)); -#ifdef BUILD_MMX - init_mask_pixel_span_funcs_mmx(); - init_mask_pixel_color_span_funcs_mmx(); - init_mask_pixel_mask_span_funcs_mmx(); - init_mask_color_span_funcs_mmx(); - init_mask_mask_color_span_funcs_mmx(); - - init_mask_pixel_pt_funcs_mmx(); - init_mask_pixel_color_pt_funcs_mmx(); - init_mask_pixel_mask_pt_funcs_mmx(); - init_mask_color_pt_funcs_mmx(); - init_mask_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_mask_pixel_span_funcs_c(); - init_mask_pixel_color_span_funcs_c(); - init_mask_pixel_mask_span_funcs_c(); - init_mask_color_span_funcs_c(); - init_mask_mask_color_span_funcs_c(); - - init_mask_pixel_pt_funcs_c(); - init_mask_pixel_color_pt_funcs_c(); - init_mask_pixel_mask_pt_funcs_c(); - init_mask_color_pt_funcs_c(); - init_mask_mask_color_pt_funcs_c(); -#endif -} - -static void -op_mask_shutdown(void) -{ -} - -static RGBA_Gfx_Func -mask_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_mask_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_mask_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return mask_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src && src->cache_entry.flags.alpha) - s = SP; - return mask_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -mask_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_mask_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_mask_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mask_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return mask_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src_flags.alpha) - s = SP; - return mask_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am deleted file mode 100644 index e3d0b82..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_mul_color_.c \ -op_mul_color_i386.c \ -op_mul_mask_color_.c \ -op_mul_mask_color_i386.c \ -op_mul_pixel_.c \ -op_mul_pixel_color_.c \ -op_mul_pixel_color_i386.c \ -op_mul_pixel_i386.c \ -op_mul_pixel_mask_.c \ -op_mul_pixel_mask_i386.c diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in deleted file mode 100644 index 849983e..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_mul -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_mul_color_.c \ -op_mul_color_i386.c \ -op_mul_mask_color_.c \ -op_mul_mask_color_i386.c \ -op_mul_pixel_.c \ -op_mul_pixel_color_.c \ -op_mul_pixel_color_i386.c \ -op_mul_pixel_i386.c \ -op_mul_pixel_mask_.c \ -op_mul_pixel_mask_i386.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c deleted file mode 100644 index fb656b5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c +++ /dev/null @@ -1,65 +0,0 @@ -/* mul color --> dst */ - -#ifdef BUILD_C -static void -_op_mul_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - for (; d < e; d++) { - *d = MUL4_SYM(c, *d); - } -} - -static void -_op_mul_caa_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - for (; d < e; d++) { - *d = MUL_256(c, *d); - } -} - -#define _op_mul_can_dp _op_mul_c_dp - -#define _op_mul_c_dpan _op_mul_c_dp -#define _op_mul_can_dpan _op_mul_can_dp -#define _op_mul_caa_dpan _op_mul_caa_dp - -static void -init_mul_color_span_funcs_c(void) -{ - op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_c_dp; - op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_can_dp; - op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_caa_dp; - - op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_c_dpan; - op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_can_dpan; - op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mul_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - *d = MUL4_SYM(c, *d); -} - -#define _op_mul_pt_can_dp _op_mul_pt_c_dp -#define _op_mul_pt_caa_dp _op_mul_pt_c_dp - -#define _op_mul_pt_c_dpan _op_mul_pt_c_dp -#define _op_mul_pt_can_dpan _op_mul_pt_can_dp -#define _op_mul_pt_caa_dpan _op_mul_pt_caa_dp - -static void -init_mul_color_pt_funcs_c(void) -{ - op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_pt_c_dp; - op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_can_dp; - op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_caa_dp; - - op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_c_dpan; - op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_can_dpan; - op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_caa_dpan; -} -#endif - diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c deleted file mode 100644 index 95f43f6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c +++ /dev/null @@ -1,66 +0,0 @@ -/* mul color --> dst */ - -#ifdef BUILD_MMX -static void -_op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(c, mm2, mm0) - for (; d < e; d++) { - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - } -} - -#define _op_mul_can_dp_mmx _op_mul_c_dp_mmx -#define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx - -#define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx -#define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx -#define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx - -static void -init_mul_color_span_funcs_mmx(void) -{ - op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx; - op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx; - op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx; - - op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx; - op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx; - op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(c, mm2, mm0) - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx -#define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx - -#define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx -#define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx -#define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx - -static void -init_mul_color_pt_funcs_mmx(void) -{ - op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx; - op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx; - op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx; - - op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx; - op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx; - op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c deleted file mode 100644 index 7a6e403..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c +++ /dev/null @@ -1,72 +0,0 @@ -/* mul mask x color -> dst */ - -#ifdef BUILD_C -static void -_op_mul_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l, nc = ~c; - while (d < e) - { - DATA32 a = *m; - switch(a) - { - case 0: - break; - case 255: - *d = MUL4_SYM(c, *d); - break; - default: - a = ~MUL_SYM(a, nc); - *d = MUL4_SYM(a, *d); - break; - } - m++; d++; - } -} - -#define _op_mul_mas_can_dp _op_mul_mas_c_dp -#define _op_mul_mas_caa_dp _op_mul_mas_c_dp - -#define _op_mul_mas_c_dpan _op_mul_mas_c_dp -#define _op_mul_mas_can_dpan _op_mul_mas_can_dp -#define _op_mul_mas_caa_dpan _op_mul_mas_caa_dp - -static void -init_mul_mask_color_span_funcs_c(void) -{ - op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_mas_c_dp; - op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_mas_can_dp; - op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_mas_caa_dp; - - op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_mas_c_dpan; - op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_mas_can_dpan; - op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_mas_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mul_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { - c = ~c; - c = ~MUL_SYM(m, c); - *d = MUL4_SYM(c, *d); -} - -#define _op_mul_pt_mas_can_dp _op_mul_pt_mas_c_dp -#define _op_mul_pt_mas_caa_dp _op_mul_pt_mas_c_dp - -#define _op_mul_pt_mas_c_dpan _op_mul_pt_mas_c_dp -#define _op_mul_pt_mas_can_dpan _op_mul_pt_mas_can_dp -#define _op_mul_pt_mas_caa_dpan _op_mul_pt_mas_caa_dp - -static void -init_mul_mask_color_pt_funcs_c(void) -{ - op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_pt_mas_c_dp; - op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_pt_mas_can_dp; - op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_pt_mas_caa_dp; - - op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_pt_mas_c_dpan; - op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_pt_mas_can_dpan; - op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_pt_mas_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c deleted file mode 100644 index 1999503..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c +++ /dev/null @@ -1,92 +0,0 @@ -/* mul mask x color -> dst */ - -#ifdef BUILD_MMX -static void -_op_mul_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_P2R(c, mm2, mm0) - c = ~c; - MOV_P2R(c, mm3, mm0) - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - while (d < e) { - DATA32 a = *m; - switch(a) - { - case 0: - break; - case 255: - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - default: - a++; - MOV_A2R(a, mm1) - MUL4_256_R2R(mm3, mm1) - movq_r2r(mm5, mm4); - psubw_r2r(mm1, mm4); - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - m++; d++; - } -} - -#define _op_mul_mas_can_dp_mmx _op_mul_mas_c_dp_mmx -#define _op_mul_mas_caa_dp_mmx _op_mul_mas_c_dp_mmx - -#define _op_mul_mas_c_dpan_mmx _op_mul_mas_c_dp_mmx -#define _op_mul_mas_can_dpan_mmx _op_mul_mas_can_dp_mmx -#define _op_mul_mas_caa_dpan_mmx _op_mul_mas_caa_dp_mmx - -static void -init_mul_mask_color_span_funcs_mmx(void) -{ - op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_mas_c_dp_mmx; - op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_mas_can_dp_mmx; - op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_mas_caa_dp_mmx; - - op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_mas_c_dpan_mmx; - op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_mas_can_dpan_mmx; - op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_mas_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mul_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { - s = m + 1; - c = ~c; - MOV_P2R(c, mm3, mm0) - MOV_A2R(ALPHA_255, mm4) - pxor_r2r(mm0, mm0); - MOV_A2R(s, mm1) - MUL4_256_R2R(mm3, mm1) - psubw_r2r(mm1, mm4); - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mul_pt_mas_can_dp_mmx _op_mul_pt_mas_c_dp_mmx -#define _op_mul_pt_mas_caa_dp_mmx _op_mul_pt_mas_c_dp_mmx - -#define _op_mul_pt_mas_c_dpan_mmx _op_mul_pt_mas_c_dp_mmx -#define _op_mul_pt_mas_can_dpan_mmx _op_mul_pt_mas_can_dp_mmx -#define _op_mul_pt_mas_caa_dpan_mmx _op_mul_pt_mas_caa_dp_mmx - -static void -init_mul_mask_color_pt_funcs_mmx(void) -{ - op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_pt_mas_c_dp_mmx; - op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_pt_mas_can_dp_mmx; - op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_pt_mas_caa_dp_mmx; - - op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_pt_mas_c_dpan_mmx; - op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_mas_can_dpan_mmx; - op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_mas_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c deleted file mode 100644 index 2e034b9..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c +++ /dev/null @@ -1,56 +0,0 @@ -/* mul pixel --> dst */ - -#ifdef BUILD_C -static void -_op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = d + l; - for (; d < e; d++, s++) { - *d = MUL4_SYM(*s, *d); - } -} - -#define _op_mul_pas_dp _op_mul_p_dp -#define _op_mul_pan_dp _op_mul_p_dp - -#define _op_mul_p_dpan _op_mul_p_dp -#define _op_mul_pas_dpan _op_mul_pas_dp -#define _op_mul_pan_dpan _op_mul_pan_dp - -static void -init_mul_pixel_span_funcs_c(void) -{ - op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp; - op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp; - op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp; - - op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan; - op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan; - op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - *d = MUL4_SYM(s, *d); -} - -#define _op_mul_pt_pas_dp _op_mul_pt_p_dp -#define _op_mul_pt_pan_dp _op_mul_pt_p_dp - -#define _op_mul_pt_p_dpan _op_mul_pt_p_dp -#define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp -#define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp - -static void -init_mul_pixel_pt_funcs_c(void) -{ - op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp; - op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp; - op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp; - - op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan; - op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan; - op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c deleted file mode 100644 index 3ea6919..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c +++ /dev/null @@ -1,122 +0,0 @@ -/* mul pixel x color --> dst */ - -#ifdef BUILD_C -static void -_op_mul_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) { - DATA32 cs = MUL4_SYM(c, *s); - *d = MUL4_SYM(cs, *d); - s++; d++; - } -} - -static void -_op_mul_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - c = 1 + (c >> 24); - while (d < e) - { - DATA32 cs = MUL_256(c, *s); - *d = MUL4_SYM(cs, *d); - s++; d++; - } -} - -#define _op_mul_pas_c_dp _op_mul_p_c_dp -#define _op_mul_pan_c_dp _op_mul_p_c_dp -#define _op_mul_p_can_dp _op_mul_p_c_dp -#define _op_mul_pas_can_dp _op_mul_p_c_dp -#define _op_mul_pan_can_dp _op_mul_p_c_dp -#define _op_mul_pas_caa_dp _op_mul_p_caa_dp -#define _op_mul_pan_caa_dp _op_mul_p_caa_dp - -#define _op_mul_p_c_dpan _op_mul_p_c_dp -#define _op_mul_pas_c_dpan _op_mul_pas_c_dp -#define _op_mul_pan_c_dpan _op_mul_pan_c_dp -#define _op_mul_p_can_dpan _op_mul_p_can_dp -#define _op_mul_pas_can_dpan _op_mul_pas_can_dp -#define _op_mul_pan_can_dpan _op_mul_pan_can_dp -#define _op_mul_p_caa_dpan _op_mul_p_caa_dp -#define _op_mul_pas_caa_dpan _op_mul_pas_caa_dp -#define _op_mul_pan_caa_dpan _op_mul_pan_caa_dp - -static void -init_mul_pixel_color_span_funcs_c(void) -{ - op_mul_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_p_c_dp; - op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pas_c_dp; - op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pan_c_dp; - op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_p_can_dp; - op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pas_can_dp; - op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pan_can_dp; - op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_p_caa_dp; - op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pas_caa_dp; - op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pan_caa_dp; - - op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_p_c_dpan; - op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pas_c_dpan; - op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pan_c_dpan; - op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_p_can_dpan; - op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pas_can_dpan; - op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pan_can_dpan; - op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_p_caa_dpan; - op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pas_caa_dpan; - op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pan_caa_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mul_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL4_SYM(c, s); - *d = MUL4_SYM(s, *d); -} - -static void -_op_mul_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - s = MUL_SYM(c >> 24, s); - *d = MUL4_SYM(s, *d); -} - -#define _op_mul_pt_pas_c_dp _op_mul_pt_p_c_dp -#define _op_mul_pt_pan_c_dp _op_mul_pt_p_c_dp -#define _op_mul_pt_p_can_dp _op_mul_pt_p_c_dp -#define _op_mul_pt_pas_can_dp _op_mul_pt_p_c_dp -#define _op_mul_pt_pan_can_dp _op_mul_pt_p_c_dp -#define _op_mul_pt_pas_caa_dp _op_mul_pt_p_caa_dp -#define _op_mul_pt_pan_caa_dp _op_mul_pt_p_caa_dp - -#define _op_mul_pt_p_c_dpan _op_mul_pt_p_c_dp -#define _op_mul_pt_pan_c_dpan _op_mul_pt_pan_c_dp -#define _op_mul_pt_pas_c_dpan _op_mul_pt_pas_c_dp -#define _op_mul_pt_p_can_dpan _op_mul_pt_p_can_dp -#define _op_mul_pt_pan_can_dpan _op_mul_pt_pan_can_dp -#define _op_mul_pt_pas_can_dpan _op_mul_pt_pas_can_dp -#define _op_mul_pt_p_caa_dpan _op_mul_pt_p_caa_dp -#define _op_mul_pt_pan_caa_dpan _op_mul_pt_pan_caa_dp -#define _op_mul_pt_pas_caa_dpan _op_mul_pt_pas_caa_dp -static void -init_mul_pixel_color_pt_funcs_c(void) -{ - op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_pt_p_c_dp; - op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pt_pas_c_dp; - op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pt_pan_c_dp; - op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_p_can_dp; - op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pas_can_dp; - op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pan_can_dp; - op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_p_caa_dp; - op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pas_caa_dp; - op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pan_caa_dp; - - op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_p_c_dpan; - op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pas_c_dpan; - op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pan_c_dpan; - op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_p_can_dpan; - op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pas_can_dpan; - op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pan_can_dpan; - op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_p_caa_dpan; - op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pas_caa_dpan; - op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pan_caa_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c deleted file mode 100644 index 24f5a80..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c +++ /dev/null @@ -1,120 +0,0 @@ -/* mul pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -_op_mul_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - while (d < e) - { - MOV_P2R(*s, mm3, mm0) - MUL4_SYM_R2R(mm2, mm3, mm5) - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - s++; d++; - } -} - -#define _op_mul_pas_c_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pan_c_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_p_can_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pas_can_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pan_can_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_p_caa_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pas_caa_dp_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pan_caa_dp_mmx _op_mul_p_c_dp_mmx - -#define _op_mul_p_c_dpan_mmx _op_mul_p_c_dp_mmx -#define _op_mul_pan_c_dpan_mmx _op_mul_pan_c_dp_mmx -#define _op_mul_pas_c_dpan_mmx _op_mul_pas_c_dp_mmx -#define _op_mul_p_can_dpan_mmx _op_mul_p_can_dp_mmx -#define _op_mul_pan_can_dpan_mmx _op_mul_pan_can_dp_mmx -#define _op_mul_pas_can_dpan_mmx _op_mul_pas_can_dp_mmx -#define _op_mul_p_caa_dpan_mmx _op_mul_p_caa_dp_mmx -#define _op_mul_pan_caa_dpan_mmx _op_mul_pan_caa_dp_mmx -#define _op_mul_pas_caa_dpan_mmx _op_mul_pas_caa_dp_mmx - -static void -init_mul_pixel_color_span_funcs_mmx(void) -{ - op_mul_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_p_c_dp_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pas_c_dp_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pan_c_dp_mmx; - op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_p_can_dp_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pas_can_dp_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pan_can_dp_mmx; - op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_p_caa_dp_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pas_caa_dp_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pan_caa_dp_mmx; - - op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_p_c_dpan_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pas_c_dpan_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pan_c_dpan_mmx; - op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_p_can_dpan_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pas_can_dpan_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pan_can_dpan_mmx; - op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_p_caa_dpan_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pas_caa_dpan_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pan_caa_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mul_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - MOV_P2R(c, mm2, mm0) - MOV_P2R(s, mm3, mm0) - MUL4_SYM_R2R(mm2, mm3, mm5) - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mul_pt_pas_c_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pan_c_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_p_can_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pas_can_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pan_can_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_p_caa_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pas_caa_dp_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pan_caa_dp_mmx _op_mul_pt_p_c_dp_mmx - -#define _op_mul_pt_p_c_dpan_mmx _op_mul_pt_p_c_dp_mmx -#define _op_mul_pt_pan_c_dpan_mmx _op_mul_pt_pan_c_dp_mmx -#define _op_mul_pt_pas_c_dpan_mmx _op_mul_pt_pas_c_dp_mmx -#define _op_mul_pt_p_can_dpan_mmx _op_mul_pt_p_can_dp_mmx -#define _op_mul_pt_pan_can_dpan_mmx _op_mul_pt_pan_can_dp_mmx -#define _op_mul_pt_pas_can_dpan_mmx _op_mul_pt_pas_can_dp_mmx -#define _op_mul_pt_p_caa_dpan_mmx _op_mul_pt_p_caa_dp_mmx -#define _op_mul_pt_pan_caa_dpan_mmx _op_mul_pt_pan_caa_dp_mmx -#define _op_mul_pt_pas_caa_dpan_mmx _op_mul_pt_pas_caa_dp_mmx - -static void -init_mul_pixel_color_pt_funcs_mmx(void) -{ - op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_p_c_dp_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pas_c_dp_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pan_c_dp_mmx; - op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_p_can_dp_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pas_can_dp_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pan_can_dp_mmx; - op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_p_caa_dp_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pas_caa_dp_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pan_caa_dp_mmx; - - op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_p_c_dpan_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pas_c_dpan_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pan_c_dpan_mmx; - op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_p_can_dpan_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pas_can_dpan_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pan_can_dpan_mmx; - op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_p_caa_dpan_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pas_caa_dpan_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pan_caa_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c deleted file mode 100644 index 0db6cd7..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c +++ /dev/null @@ -1,66 +0,0 @@ -/* mul pixel --> dst */ - -#ifdef BUILD_MMX -static void -_op_mul_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { - DATA32 *e = s + l; - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - for (; s < e; s++, d++) { - MOV_P2R(*d, mm1, mm0) - MOV_P2R(*s, mm2, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - } -} - -#define _op_mul_pas_dp_mmx _op_mul_p_dp_mmx -#define _op_mul_pan_dp_mmx _op_mul_p_dp_mmx - -#define _op_mul_p_dpan_mmx _op_mul_p_dp_mmx -#define _op_mul_pan_dpan_mmx _op_mul_pan_dp_mmx -#define _op_mul_pas_dpan_mmx _op_mul_pas_dp_mmx - -static void -init_mul_pixel_span_funcs_mmx(void) -{ - op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_p_dp_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pan_dp_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pas_dp_mmx; - - op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_p_dpan_mmx; - op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_dpan_mmx; - op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -_op_mul_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(*d, mm1, mm0) - MOV_P2R(s, mm2, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) -} - -#define _op_mul_pt_pan_dp_mmx _op_mul_pt_p_dp_mmx -#define _op_mul_pt_pas_dp_mmx _op_mul_pt_p_dp_mmx - -#define _op_mul_pt_p_dpan_mmx _op_mul_pt_p_dp_mmx -#define _op_mul_pt_pan_dpan_mmx _op_mul_pt_pan_dp_mmx -#define _op_mul_pt_pas_dpan_mmx _op_mul_pt_pas_dp_mmx - -static void -init_mul_pixel_pt_funcs_mmx(void) -{ - op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_p_dp_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pan_dp_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pas_dp_mmx; - - op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_p_dpan_mmx; - op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pan_dpan_mmx; - op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pas_dpan_mmx; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c deleted file mode 100644 index 37d0497..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c +++ /dev/null @@ -1,117 +0,0 @@ -/* mul pixel x mask --> dst */ - -#ifdef BUILD_C -static void -_op_mul_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) - { - c = *m; - switch(c) - { - case 0: - break; - case 255: - *d = MUL4_SYM(*s, *d); - break; - default: - c = ~(*s); - c = ~MUL_SYM(*m, c); - *d = MUL4_SYM(c, *d); - break; - } - m++; s++; d++; - } -} - -static void -_op_mul_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) - { - c = *m; - switch(c) - { - case 0: - break; - case 255: - *d = (*d & 0xff000000) + MUL3_SYM(*s, *d); - break; - default: - c = ~(*s); - c = ~MUL_SYM(*m, c); - *d = (*d & 0xff000000) + MUL3_SYM(c, *d); - break; - } - m++; s++; d++; - } -} - -static void -_op_mul_p_mas_dpan(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - while (d < e) - { - c = *m; - switch(c) - { - case 0: - break; - case 255: - *d = (*s & 0xff000000) + MUL3_SYM(*s, *d); - break; - default: - c = ~(*s); - c = ~MUL_SYM(*m, c); - *d = (c & 0xff000000) + MUL3_SYM(c, *d); - break; - } - m++; d++; - } -} - -#define _op_mul_pas_mas_dp _op_mul_p_mas_dp - -#define _op_mul_pan_mas_dpan _op_mul_p_mas_dpan -#define _op_mul_pas_mas_dpan _op_mul_p_mas_dpan - -static void -init_mul_pixel_mask_span_funcs_c(void) -{ - op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_p_mas_dp; - op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pas_mas_dp; - op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pan_mas_dp; - - op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_p_mas_dpan; - op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pas_mas_dpan; - op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pan_mas_dpan; -} -#endif - -#ifdef BUILD_C -static void -_op_mul_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { - s = ~s; - s = ~MUL_SYM(m, s); - *d = MUL4_SYM(s, *d); -} - -#define _op_mul_pt_pas_mas_dp _op_mul_pt_p_mas_dp -#define _op_mul_pt_pan_mas_dp _op_mul_pt_p_mas_dp - -#define _op_mul_pt_p_mas_dpan _op_mul_pt_p_mas_dp -#define _op_mul_pt_pas_mas_dpan _op_mul_pt_p_mas_dp -#define _op_mul_pt_pan_mas_dpan _op_mul_pt_p_mas_dp - -static void -init_mul_pixel_mask_pt_funcs_c(void) -{ - op_mul_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_p_mas_dp; - op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pas_mas_dp; - op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pan_mas_dp; - - op_mul_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_mas_dpan; - op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_mas_dpan; - op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_mas_dpan; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c deleted file mode 100644 index ebbac01..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c +++ /dev/null @@ -1,63 +0,0 @@ -/* mul pixel x mask --> dst */ - -#ifdef BUILD_MMX -static void -_op_mul_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { - DATA32 *e = d + l; - MOV_A2R(ALPHA_255, mm5) - pxor_r2r(mm0, mm0); - while (d < e) { - c = *m; - switch(c) - { - case 0: - break; - case 255: - MOV_P2R(*d, mm1, mm0) - MOV_P2R(*s, mm2, mm0) - MUL4_SYM_R2R(mm2, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - default: - c++; - MOV_A2R(c, mm1) - c = ~(*s); - MOV_P2R(c, mm3, mm0) - MUL4_256_R2R(mm3, mm1) - movq_r2r(mm5, mm4); - psubw_r2r(mm1, mm4); - MOV_P2R(*d, mm1, mm0) - MUL4_SYM_R2R(mm4, mm1, mm5) - MOV_R2P(mm1, *d, mm0) - break; - } - s++; m++; d++; - } -} - -#define _op_mul_pas_mas_dp_mmx _op_mul_p_mas_dp_mmx -#define _op_mul_pan_mas_dp_mmx _op_mul_p_mas_dp_mmx - -#define _op_mul_p_mas_dpan_mmx _op_mul_p_mas_dp_mmx -#define _op_mul_pas_mas_dpan_mmx _op_mul_pas_mas_dp_mmx -#define _op_mul_pan_mas_dpan_mmx _op_mul_pan_mas_dp_mmx - -static void -init_mul_pixel_mask_span_funcs_mmx(void) -{ - op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_p_mas_dp_mmx; - op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pas_mas_dp_mmx; - op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pan_mas_dp_mmx; - - op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_p_mas_dpan_mmx; - op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_mas_dpan_mmx; - op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_mas_dpan_mmx; -} -#endif - -#ifdef BUILD_MMX -static void -init_mul_pixel_mask_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c deleted file mode 100644 index 25fa932..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mul_main_.c +++ /dev/null @@ -1,308 +0,0 @@ -#include "evas_common.h" - -static RGBA_Gfx_Func op_mul_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_mul_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_mul_init(void); -static void op_mul_shutdown(void); - -static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_mul = { "mul", - op_mul_init, op_mul_shutdown, - op_mul_pixel_span_get, op_mul_color_span_get, - op_mul_pixel_color_span_get, op_mul_mask_color_span_get, - op_mul_pixel_mask_span_get, - op_mul_pixel_pt_get, op_mul_color_pt_get, - op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get, - op_mul_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_mul_get(void) -{ - return &(_composite_mul); -} - - -# include "./evas_op_mul/op_mul_pixel_.c" -# include "./evas_op_mul/op_mul_color_.c" -# include "./evas_op_mul/op_mul_pixel_color_.c" -# include "./evas_op_mul/op_mul_pixel_mask_.c" -# include "./evas_op_mul/op_mul_mask_color_.c" -//# include "./evas_op_mul/op_mul_pixel_mask_color_.c" - -# include "./evas_op_mul/op_mul_pixel_i386.c" -# include "./evas_op_mul/op_mul_color_i386.c" -# include "./evas_op_mul/op_mul_pixel_color_i386.c" -# include "./evas_op_mul/op_mul_pixel_mask_i386.c" -# include "./evas_op_mul/op_mul_mask_color_i386.c" -// # include "./evas_op_mul/op_mul_pixel_mask_color_i386.c" - -static void -op_mul_init(void) -{ - memset(op_mul_span_funcs, 0, sizeof(op_mul_span_funcs)); - memset(op_mul_pt_funcs, 0, sizeof(op_mul_pt_funcs)); -#ifdef BUILD_MMX - init_mul_pixel_span_funcs_mmx(); - init_mul_pixel_color_span_funcs_mmx(); - init_mul_pixel_mask_span_funcs_mmx(); - init_mul_color_span_funcs_mmx(); - init_mul_mask_color_span_funcs_mmx(); - - init_mul_pixel_pt_funcs_mmx(); - init_mul_pixel_color_pt_funcs_mmx(); - init_mul_pixel_mask_pt_funcs_mmx(); - init_mul_color_pt_funcs_mmx(); - init_mul_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_mul_pixel_span_funcs_c(); - init_mul_pixel_color_span_funcs_c(); - init_mul_pixel_mask_span_funcs_c(); - init_mul_color_span_funcs_c(); - init_mul_mask_color_span_funcs_c(); - - init_mul_pixel_pt_funcs_c(); - init_mul_pixel_color_pt_funcs_c(); - init_mul_pixel_mask_pt_funcs_c(); - init_mul_color_pt_funcs_c(); - init_mul_mask_color_pt_funcs_c(); -#endif -} - -static void -op_mul_shutdown(void) -{ -} - -static RGBA_Gfx_Func -mul_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_mul_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_mul_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return mul_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src && src->cache_entry.flags.alpha) - s = SP; - return mul_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -mul_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_mul_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_mul_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - { - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mul_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - s = SP; - } - if ((col >> 24) < 255) - { - if (dst) - dst->cache_entry.flags.alpha = 1; - c = SC; - } - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return mul_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - return mul_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP; - - if (dst) - dst->cache_entry.flags.alpha = 1; - if (src_flags.alpha) - s = SP; - return mul_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am deleted file mode 100644 index a8eca14..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -op_sub_color_.c \ -op_sub_color_i386.c \ -op_sub_mask_color_.c \ -op_sub_mask_color_i386.c \ -op_sub_pixel_.c \ -op_sub_pixel_color_.c \ -op_sub_pixel_color_i386.c \ -op_sub_pixel_i386.c \ -op_sub_pixel_mask_.c \ -op_sub_pixel_mask_i386.c - diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in deleted file mode 100644 index 885465a..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in +++ /dev/null @@ -1,547 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common/evas_op_sub -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -op_sub_color_.c \ -op_sub_color_i386.c \ -op_sub_mask_color_.c \ -op_sub_mask_color_i386.c \ -op_sub_pixel_.c \ -op_sub_pixel_color_.c \ -op_sub_pixel_color_i386.c \ -op_sub_pixel_i386.c \ -op_sub_pixel_mask_.c \ -op_sub_pixel_mask_i386.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c deleted file mode 100644 index 8490b68..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub color -> dst */ - -#ifdef BUILD_C -static void -init_sub_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel color -> dst */ - -#ifdef BUILD_C -static void -init_sub_rel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_rel_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c deleted file mode 100644 index d8fbbea..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub color -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_color_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel color -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_rel_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_rel_color_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c deleted file mode 100644 index 0584227..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub mask x color -> dst */ - -#ifdef BUILD_C -static void -init_sub_mask_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_mask_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel mask x color -> dst */ - -#ifdef BUILD_C -static void -init_sub_rel_mask_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_rel_mask_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c deleted file mode 100644 index 972a2c9..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub mask x color -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_mask_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_mask_color_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel mask x color -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_rel_mask_color_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_rel_mask_color_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c deleted file mode 100644 index 97001d4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub pixel --> dst */ - -#ifdef BUILD_C -static void -init_sub_pixel_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_pixel_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel pixel --> dst */ - -#ifdef BUILD_C -static void -init_sub_rel_pixel_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_rel_pixel_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c deleted file mode 100644 index 13caa0b..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub pixel x color --> dst */ - -#ifdef BUILD_C -static void -init_sub_pixel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_pixel_color_pt_funcs_c(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel pixel x color --> dst */ - -#ifdef BUILD_C -static void -init_sub_rel_pixel_color_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_rel_pixel_color_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c deleted file mode 100644 index e3c1793..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c +++ /dev/null @@ -1,29 +0,0 @@ -/* sub pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -init_sub_pixel_color_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_sub_pixel_color_pt_funcs_mmx(void) -{ } -#endif - -/*-----*/ - -/* sub_rel pixel x color --> dst */ - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_color_span_funcs_mmx(void) -{ } -#endif - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_color_pt_funcs_mmx(void) -{ } -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c deleted file mode 100644 index 95e2ab6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub pixel --> dst */ - -#ifdef BUILD_MMX -static void -init_sub_pixel_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_pixel_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel pixel --> dst */ - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c deleted file mode 100644 index c0c67be..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c +++ /dev/null @@ -1,37 +0,0 @@ -/* sub pixel x mask --> dst */ - -#ifdef BUILD_C -/* XXX: not used -static void -init_sub_pixel_mask_span_funcs_c(void) -{ -} -*/ -#endif - -#ifdef BUILD_C -/* XXX: not used -static void -init_sub_pixel_mask_pt_funcs_c(void) -{ -} -*/ -#endif - -/*-----*/ - -/* sub_rel pixel x mask --> dst */ - -#ifdef BUILD_C -static void -init_sub_rel_pixel_mask_span_funcs_c(void) -{ -} -#endif - -#ifdef BUILD_C -static void -init_sub_rel_pixel_mask_pt_funcs_c(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c deleted file mode 100644 index bfd145e..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c +++ /dev/null @@ -1,33 +0,0 @@ -/* sub pixel x mask -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_pixel_mask_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_pixel_mask_pt_funcs_mmx(void) -{ -} -#endif - -/*-----*/ - -/* sub_rel pixel x mask -> dst */ - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_mask_span_funcs_mmx(void) -{ -} -#endif - -#ifdef BUILD_MMX -static void -init_sub_rel_pixel_mask_pt_funcs_mmx(void) -{ -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c b/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c deleted file mode 100644 index 329c2e4..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_sub_main_.c +++ /dev/null @@ -1,542 +0,0 @@ -#include "evas_common.h" - -static RGBA_Gfx_Func op_sub_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_sub_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_sub_init(void); -static void op_sub_shutdown(void); - -static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_sub = { "sub", - op_sub_init, op_sub_shutdown, - op_sub_pixel_span_get, op_sub_color_span_get, - op_sub_pixel_color_span_get, op_sub_mask_color_span_get, - op_sub_pixel_mask_span_get, - op_sub_pixel_pt_get, op_sub_color_pt_get, - op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get, - op_sub_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_sub_get(void) -{ - return &(_composite_sub); -} - -static RGBA_Gfx_Func op_sub_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; -static RGBA_Gfx_Pt_Func op_sub_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; - -static void op_sub_rel_init(void); -static void op_sub_rel_shutdown(void); - -static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); -static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); - -static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); -static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); - -static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel", - op_sub_rel_init, op_sub_rel_shutdown, - op_sub_rel_pixel_span_get, op_sub_rel_color_span_get, - op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get, - op_sub_rel_pixel_mask_span_get, - op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get, - op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get, - op_sub_rel_pixel_mask_pt_get - }; - -RGBA_Gfx_Compositor * -evas_common_gfx_compositor_sub_rel_get(void) -{ - return &(_composite_sub_rel); -} - - -# include "./evas_op_sub/op_sub_pixel_.c" -# include "./evas_op_sub/op_sub_color_.c" -# include "./evas_op_sub/op_sub_pixel_color_.c" -# include "./evas_op_sub/op_sub_pixel_mask_.c" -# include "./evas_op_sub/op_sub_mask_color_.c" -//# include "./evas_op_sub/op_sub_pixel_mask_color_.c" - -# include "./evas_op_sub/op_sub_pixel_i386.c" -# include "./evas_op_sub/op_sub_color_i386.c" -# include "./evas_op_sub/op_sub_pixel_color_i386.c" -# include "./evas_op_sub/op_sub_pixel_mask_i386.c" -# include "./evas_op_sub/op_sub_mask_color_i386.c" -//# include "./evas_op_sub/op_sub_pixel_mask_color_i386.c" - -static void -op_sub_init(void) -{ - memset(op_sub_span_funcs, 0, sizeof(op_sub_span_funcs)); - memset(op_sub_pt_funcs, 0, sizeof(op_sub_pt_funcs)); -#ifdef BUILD_MMX - init_sub_pixel_span_funcs_mmx(); - init_sub_pixel_color_span_funcs_mmx(); - init_sub_pixel_mask_span_funcs_mmx(); - init_sub_color_span_funcs_mmx(); - init_sub_mask_color_span_funcs_mmx(); - - init_sub_pixel_pt_funcs_mmx(); - init_sub_pixel_color_pt_funcs_mmx(); - init_sub_pixel_mask_pt_funcs_mmx(); - init_sub_color_pt_funcs_mmx(); - init_sub_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_sub_pixel_span_funcs_c(); - init_sub_pixel_color_span_funcs_c(); - init_sub_rel_pixel_mask_span_funcs_c(); - init_sub_color_span_funcs_c(); - init_sub_mask_color_span_funcs_c(); - - init_sub_pixel_pt_funcs_c(); - init_sub_pixel_color_pt_funcs_c(); - init_sub_rel_pixel_mask_pt_funcs_c(); - init_sub_color_pt_funcs_c(); - init_sub_mask_color_pt_funcs_c(); -#endif -} - -static void -op_sub_shutdown(void) -{ -} - -static RGBA_Gfx_Func -sub_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_sub_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_sub_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -sub_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_sub_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_sub_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_gfx_pt_func_cpu(s, m, c, d); -} - - - -static void -op_sub_rel_init(void) -{ - memset(op_sub_rel_span_funcs, 0, sizeof(op_sub_rel_span_funcs)); - memset(op_sub_rel_pt_funcs, 0, sizeof(op_sub_rel_pt_funcs)); -#ifdef BUILD_MMX - init_sub_rel_pixel_span_funcs_mmx(); - init_sub_rel_pixel_color_span_funcs_mmx(); - init_sub_rel_pixel_mask_span_funcs_mmx(); - init_sub_rel_color_span_funcs_mmx(); - init_sub_rel_mask_color_span_funcs_mmx(); - - init_sub_rel_pixel_pt_funcs_mmx(); - init_sub_rel_pixel_color_pt_funcs_mmx(); - init_sub_rel_pixel_mask_pt_funcs_mmx(); - init_sub_rel_color_pt_funcs_mmx(); - init_sub_rel_mask_color_pt_funcs_mmx(); -#endif -#ifdef BUILD_C - init_sub_rel_pixel_span_funcs_c(); - init_sub_rel_pixel_color_span_funcs_c(); - init_sub_rel_pixel_mask_span_funcs_c(); - init_sub_rel_color_span_funcs_c(); - init_sub_rel_mask_color_span_funcs_c(); - - init_sub_rel_pixel_pt_funcs_c(); - init_sub_rel_pixel_color_pt_funcs_c(); - init_sub_rel_pixel_mask_pt_funcs_c(); - init_sub_rel_color_pt_funcs_c(); - init_sub_rel_mask_color_pt_funcs_c(); -#endif -} - -static void -op_sub_rel_shutdown(void) -{ -} - -static RGBA_Gfx_Func -sub_rel_gfx_span_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_sub_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_sub_rel_span_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Func -op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Func -op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src && src->cache_entry.flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_span_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d) -{ - RGBA_Gfx_Pt_Func func = NULL; - int cpu = CPU_N; -#ifdef BUILD_MMX - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - { - cpu = CPU_MMX; - func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; - } -#endif -#ifdef BUILD_C - cpu = CPU_C; - func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; - if (func) return func; -#endif - return func; -} - -static RGBA_Gfx_Pt_Func -op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) -{ - int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; - - if ((col >> 24) < 255) - c = SC; - if (col == (col | 0x00ffffff)) - c = SC_AA; - if (col == 0xffffffff) - c = SC_N; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_pt_func_cpu(s, m, c, d); -} - -static RGBA_Gfx_Pt_Func -op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) -{ - int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; - - if (src_flags.alpha) - s = SP; - if (dst && dst->cache_entry.flags.alpha) - d = DP; - return sub_rel_gfx_pt_func_cpu(s, m, c, d); -} diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.c b/libraries/evas/src/lib/engines/common/evas_pipe.c deleted file mode 100644 index 66085c8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_pipe.c +++ /dev/null @@ -1,1733 +0,0 @@ -// THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE - -#include "evas_common.h" -#include - -#ifdef BUILD_PIPE_RENDER - -#ifdef EVAS_FRAME_QUEUING -#define SCALECACHE -static Evas_FrameQ gframeq; // global frameQ - -static Evas_Surface * -evas_common_surface_alloc(void *surface, int x, int y, int w, int h) -{ - Evas_Surface *e_surface; - - e_surface = calloc(1, sizeof(Evas_Surface)); - e_surface->im = surface; - LKL(e_surface->im->cache_entry.ref_fq_add); - e_surface->im->cache_entry.ref_fq[0]++; - LKU(e_surface->im->cache_entry.ref_fq_add); - e_surface->x = x; - e_surface->y = y; - e_surface->w = w; - e_surface->h = h; - - return e_surface; -} - -static void -evas_common_surface_dealloc(Evas_Surface *surface) -{ - Evas_Surface *d_surface; - - while (surface) - { - d_surface = surface; - surface = (Evas_Surface *)eina_inlist_remove(EINA_INLIST_GET(surface), EINA_INLIST_GET(d_surface)); - LKL(d_surface->im->cache_entry.ref_fq_del); - d_surface->im->cache_entry.ref_fq[1]++; - LKU(d_surface->im->cache_entry.ref_fq_del); - free(d_surface); - } -} - -static void -evas_common_surface_add(Evas_Frame *frame, Evas_Surface *surface) -{ - frame->surfaces = (Evas_Surface *)eina_inlist_append(EINA_INLIST_GET(frame->surfaces), EINA_INLIST_GET(surface)); -} - -static Evas_Frame * -evas_common_frame_alloc(void) -{ - Evas_Frame *frame; - - frame = calloc(1, sizeof(Evas_Frame)); - frame->surfaces = NULL; - return frame; -} - -static void -evas_common_frame_dealloc(Evas_Frame *frame) -{ - evas_common_surface_dealloc(frame->surfaces); - free(frame); -} - -static void -evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame) -{ - Evas_Frame *temp_frame; - - LKL(frameq->mutex); - while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz) - { - /* wait a worker thread finish previous frame */ - eina_condition_wait(&(frameq->cond_done)); - } - frameq->frames = (Evas_Frame *) eina_inlist_append(EINA_INLIST_GET(frameq->frames), EINA_INLIST_GET(frame)); - - // this frame need not to be scheduled for flushing time - EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame) - { - if (!temp_frame->ready) - { - break; - } - } - if (temp_frame && temp_frame == frame) - frame->dont_schedule = 1; - - LKU(frameq->mutex); - - eina_condition_signal(&(frameq->cond_new)); -} - -EAPI Evas_Surface * -evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h) -{ - return evas_common_surface_alloc(surface, x, y, w, h); -} - -EAPI void -evas_common_frameq_add_surface(Evas_Surface *surface) -{ - evas_common_surface_add(gframeq.cur_frame, surface); -} - -EAPI void -evas_common_frameq_set_frame_data(void *data, - void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h), - void (*fn_output_flush) (void *data), - void (*fn_output_set_priv)(void *data, void *cur, void *prev)) -{ - if (gframeq.cur_frame) - { - gframeq.cur_frame->data = data; - gframeq.cur_frame->output_redraws_next_update_push = fn_output_redraws_next_update_push; - gframeq.cur_frame->output_flush = fn_output_flush; - gframeq.cur_frame->output_set_priv = fn_output_set_priv; - } -} - -EAPI void -evas_common_frameq_prepare_frame(void) -{ - if (!gframeq.cur_frame ) - { - gframeq.cur_frame = evas_common_frame_alloc(); - } -} - -EAPI void -evas_common_frameq_ready_frame(void) -{ - if (gframeq.cur_frame) - { - evas_common_frame_add(&gframeq, gframeq.cur_frame); - gframeq.cur_frame = NULL; // create a new frame for the next frame later - } -} - - -EAPI void -evas_common_frameq_init(void) -{ - gframeq.frames = 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. -} - -EAPI void -evas_common_frameq_destroy(void) -{ -#if 0 // let them destroyed indirectly with program exit - LKL(gframeq.mutex); - 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; -} - -EAPI void -evas_common_frameq_flush(void) -{ - if (! evas_common_frameq_enabled()) - return; - - LKL(gframeq.mutex); - while(eina_inlist_count(EINA_INLIST_GET(gframeq.frames)) > 0) - { - /* wait a worker thread finish previous frame */ - eina_condition_wait(&(gframeq.cond_done)); - } - LKU(gframeq.mutex); -} - - -EAPI void -evas_common_frameq_flush_ready(void) -{ - return; -} - -EAPI int -evas_common_frameq_get_frameq_sz(void) -{ - return gframeq.frameq_sz; -} - -EAPI int -evas_common_frameq_enabled(void) -{ - return gframeq.initialised; -} -#endif - -static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op); -static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op); -static void evas_common_pipe_op_free(RGBA_Pipe_Op *op); - -/* utils */ -static RGBA_Pipe * -evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op) -{ - RGBA_Pipe *p; - int first_pipe = 0; - - if (!rpipe) - { - first_pipe = 1; - p = calloc(1, sizeof(RGBA_Pipe)); - if (!p) return NULL; - rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); - } - p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last; - if (p->op_num == PIPE_LEN) - { - p = calloc(1, sizeof(RGBA_Pipe)); - if (!p) return NULL; - rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); - } - p->op_num++; - *op = &(p->op[p->op_num - 1]); - if (first_pipe) - { - /* FIXME: PTHREAD init any thread locks etc */ - } - return rpipe; -} - -static void -evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op) -{ - memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context)); - if (op->context.cutout.active > 0) - { - op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active); - memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active); - } - else - { - op->context.cutout.rects = NULL; - } -} - -static void -evas_common_pipe_op_free(RGBA_Pipe_Op *op) -{ - evas_common_draw_context_apply_clean_cutouts(&op->context.cutout); -} - -#ifdef BUILD_PTHREAD -/* main api calls */ -static void * -evas_common_pipe_thread(void *data) -{ - Thinfo *thinfo; - -// INF("TH [..........."); - thinfo = data; - for (;;) - { - RGBA_Pipe_Thread_Info *info; - RGBA_Pipe *p; - - /* wait for start signal */ -// INF(" TH %i START...", thinfo->thread_num); - pthread_barrier_wait(&(thinfo->barrier[0])); - info = thinfo->info; -// if (info) -// { -// thinfo->info = NULL; -// INF(" TH %i GO", thinfo->thread_num); - EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->cache_entry.pipe), p) - { - int i; - - for (i = 0; i < p->op_num; i++) - { - if (p->op[i].op_func) - p->op[i].op_func(info->im, &(p->op[i]), info); - } - } - free(info); -// } -// INF(" TH %i DONE", thinfo->thread_num); - /* send finished signal */ - pthread_barrier_wait(&(thinfo->barrier[1])); - } - return NULL; -} - -#ifdef EVAS_FRAME_QUEUING -static void -evas_common_frameq_release(void *data) -{ - Evas_FrameQ *frameq; - Evas_Frameq_Thread_Info *fq_info; - Thinfo *thinfo; - - thinfo = data; - fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); - frameq = fq_info->frameq; - - /* This thread may or may not own the mutex. - * But there's no way to determine the ownership of the mutex, so release it anyway - */ - LKU(frameq->mutex); -} - -static void * -evas_common_frameq_thread(void *data) -{ - Evas_FrameQ *frameq; - Evas_Frame *frame; - Evas_Surface *surface; - RGBA_Pipe *p; - Thinfo *thinfo; - Evas_Frameq_Thread_Info *fq_info; - RGBA_Pipe_Thread_Info p_info; - - thinfo = data; - fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); - frameq = fq_info->frameq; - - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - /* install thread cancelation cleanup handler */ - pthread_cleanup_push(evas_common_frameq_release, data); - - for (;;) - { - frame = NULL; - - /* 1. pick a frame to draw */ - LKL(frameq->mutex); - while(!frame) - { - EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), frame) - { - if (!frame->in_process) - { - frame->in_process = 1; - break; - } - } - if (frame) - { - break; - } - pthread_testcancel(); - eina_condition_wait(&(frameq->cond_new)); - } - LKU(frameq->mutex); - - /* 2. draw selected frame */ - EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface) - { - p_info.im = surface->im; - p_info.x = 0; - p_info.y = 0; - p_info.w = surface->im->cache_entry.w; - p_info.h = surface->im->cache_entry.h; - - EINA_INLIST_FOREACH(EINA_INLIST_GET(p_info.im->cache_entry.pipe), p) - { - int i; - - for (i = 0; i < p->op_num; i++) - { - if (p->op[i].op_func) - { - p->op[i].op_func(p_info.im, &(p->op[i]), &p_info); - } - } - } - - /* push surface out */ - if (! surface->dontpush) - { - frame->output_redraws_next_update_push(frame->data, - surface->im, surface->x, surface->y, surface->w, surface->h); - } - } - - // record frame ready time, will be used in post worker thread, evas_common_frameq_thread_post() - gettimeofday(&frame->ready_time, NULL); - - LKL(frameq->mutex); - frame->ready = 1; - eina_condition_signal(&(frameq->cond_ready)); - LKU(frameq->mutex); - } - - // Remove cleanup handler - pthread_cleanup_pop(0); - return NULL; -} - - -#define INTERVAL_QSIZE 17 // Actual size is 'INTERVAL_QSIZE - 1' because of not using index -#define SATISFACTION_THRESHOLD 4 // 4 ms --> 250 FPS -#define RESET_RATIO 4 // RESET_RATIO * [Average Ready Gap | get_max_interval()] --> Reset Threshold -#define DOUBLE_RESET_TIME_INTERVAL_THRESHOLD 16000 // make it double in case of less 16ms -#define RESET_ABSOLUTE_INTERVAL 600000 // 600 msec - -struct iq_node -{ - long long rt; - long long ri; -}; - -static struct iq_node _IQ[INTERVAL_QSIZE]; -static int _IQ_head = 0, _IQ_tail = 0; -static int _IQ_length = 0; -static long long min_ready, max_ready; -static long long average_interval; - -static int -_IQ_next_index(int i) -{ - return (i + 1) % INTERVAL_QSIZE; -} - -static int -_IQ_previous_index(int i) -{ - if (--i < 0) i += INTERVAL_QSIZE; - return i; -} - -static void -_IQ_init(void) -{ - _IQ_length = _IQ_head = _IQ_tail = 0; - min_ready = LLONG_MAX, max_ready = LLONG_MIN; - average_interval = 0; -} - -static int -_IQ_empty(void) -{ - return (_IQ_head == _IQ_tail) ? 1 : 0; -} - -static int -_IQ_full(void) -{ - return (_IQ_head == ((_IQ_tail + 1) % INTERVAL_QSIZE)) ? 1 : 0; -} - -static void -_IQ_insert(long long ready_time, long long last_interval) -{ - if (_IQ_full()) return; - - if (_IQ_empty()) - { - if (last_interval < 0) - { - last_interval = -last_interval; - } - _IQ[_IQ_tail].rt = ready_time; - _IQ[_IQ_tail].ri = last_interval; - min_ready = ready_time - last_interval; - max_ready = ready_time; - _IQ_tail = _IQ_next_index(_IQ_tail); - _IQ_length++; - } - else - { - if (max_ready < ready_time) - { - _IQ[_IQ_tail].rt = ready_time; - _IQ[_IQ_tail].ri = ready_time - max_ready; - _IQ_tail = _IQ_next_index(_IQ_tail); - _IQ_length++; - max_ready = ready_time; - } - else if (ready_time < min_ready) - { - last_interval = _IQ[_IQ_head].ri; - _IQ[_IQ_head].ri = _IQ[_IQ_head].rt - ready_time; - _IQ_head = _IQ_previous_index(_IQ_head); - _IQ[_IQ_head].rt = ready_time; - _IQ[_IQ_head].ri = last_interval; - min_ready = ready_time; - _IQ_length++; - } - else - { - int i, j, k, l = 0; - for (i = _IQ_head; i != _IQ_tail; i = j) - { - j = _IQ_next_index(i); - if (_IQ[j].rt < ready_time) - { - continue; - } - break; - } - for (k = _IQ_tail; k != j; k = l) - { - l = _IQ_previous_index(k); - _IQ[k] = _IQ[l]; - } - i = _IQ_next_index(j); - _IQ[j].ri -= (_IQ[j].rt - ready_time); - _IQ[j].rt = ready_time; - _IQ[i].ri = _IQ[i].rt - ready_time; - _IQ_tail = _IQ_next_index(_IQ_tail); - _IQ_length++; - } - } - average_interval = (max_ready - min_ready) / _IQ_length; -} - -static long long -_IQ_delete(void) -{ - struct iq_node oldest; - - if (_IQ_empty()) return 0; - oldest = _IQ[_IQ_head]; - _IQ_head = (_IQ_head + 1) % INTERVAL_QSIZE; - if ((--_IQ_length) == 0) - { - _IQ_init(); - } - else - { - min_ready = _IQ[_IQ_head].rt; - average_interval = (max_ready - min_ready) / _IQ_length; - } - - return oldest.ri; -} - -static long long -get_max_interval(void) -{ - int i; - long long max = LLONG_MIN; - - for ( i= _IQ_head ; i != _IQ_tail ; i = _IQ_next_index(i)) - { - if (_IQ[i].ri > max) - { - max = _IQ[i].ri; - } - } - - return max; -} - -static long long -tv_to_long_long(struct timeval *tv) -{ - if (!tv) - { - return 0; - } - - return tv->tv_sec * 1000000LL + tv->tv_usec; -} - -static long long -evas_common_frameq_schedule_flush_time(int frameq_sz, int thread_no, - long long last_ready_time, long long current_ready_time, - long long last_flush_time, int ready_frames_num, - int dont_schedule) -{ - // to get each time and to do others - 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 = 0LL; - long long sleep_time = 0LL; - long long saved_ready_time, saved_ready_interval; - long long time_slept = 0LL; - static long long time_lag = 0; - struct timeval now; - int frameq_full_threshold =0; - int need_reset = 0; - int need_schedule = 0; - - frameq_full_threshold = frameq_sz -thread_no; // Qsize - threads# - - /* 1.5 defer flush time of current frame if need */ - // in case of the first time, just keep ready time only - if (last_ready_time == 0LL) - { - last_ready_time = current_ready_time; - } - else - { - /* 1.5.1 get current ready time & interval */ - saved_ready_time = current_ready_time; - saved_ready_interval = current_ready_interval = current_ready_time - last_ready_time; - // compensate a case which current ready time is older than previous one, - // doesn't work on the interval queue - if (current_ready_interval < 0) - { - current_ready_time = last_ready_time; - current_ready_interval = 0; - } - - /* 1.5.2 get the reset time interval before keeping a new one */ - if (!_IQ_empty()) - { - reset_time_interval = RESET_RATIO * average_interval; - if (average_interval < DOUBLE_RESET_TIME_INTERVAL_THRESHOLD) - { - reset_time_interval *= 2; - } - } - - /* 1.5.3 reset - if too late, discard all saved interval and start from here */ - if (current_ready_interval > RESET_ABSOLUTE_INTERVAL) - { - need_reset = 1; - } - else if (_IQ_length >= thread_no * 2 && current_ready_interval > reset_time_interval) - { - need_reset = 1; - } - else if (_IQ_length >= thread_no && _IQ_length < thread_no * 2 - && current_ready_interval > get_max_interval() * RESET_RATIO) - { - need_reset = 1; - } - - if (need_reset) - { - _IQ_init(); - } - else - { - /* 1.5.4 enqueue - keep a new interval for next average interval */ - if (_IQ_full()) - { - _IQ_delete(); - } - _IQ_insert(saved_ready_time, saved_ready_interval); - - /* 1.5.5 schedule - if faster than average interval, figure out sleep time to meet it */ - if (!dont_schedule) - { - need_schedule = 0; - sleep_time = 0; - if (_IQ_length >= thread_no * 2 && average_interval > theshold_time) - { - need_schedule = 1; - } - // compensate the case that postworker blocks the workers from getting a new fresh frame - // It's actually occurred when during the wait time of postworker, the frame queue is full - // Consequently check the number of currently ready frames and apply some time drop to average time according to the number - if (ready_frames_num >= frameq_full_threshold) - { - need_schedule = 0; - } - if (need_schedule) - { - gettimeofday(&now, NULL); - current_time = tv_to_long_long(&now); - time_lag += (current_time - last_flush_time); - sleep_time = (average_interval < time_lag) ? 0 : (average_interval - time_lag); - } - } - - /* 1.5.6 sleep - actually sleep and get over-slept time (time_lag) for next frame */ - if (sleep_time > 0) - { - sleep_time = sleep_time * 9 / 10; - usleep((unsigned int)sleep_time); - gettimeofday(&now, NULL); - time_slept = tv_to_long_long(&now) - current_time; - time_lag = time_slept - sleep_time; - } - else - { - time_lag = 0; - } - } - last_ready_time = current_ready_time; - } - - return last_ready_time; -} - -static void * -evas_common_frameq_thread_post(void *data) -{ - Evas_FrameQ *frameq; - Evas_Frame *frame; - Evas_Surface *surface; - Thinfo *thinfo; - Evas_Frameq_Thread_Info *fq_info; - Eina_List *pending_writes = NULL; - Eina_List *prev_pending_writes = NULL; - - long long last_ready_time = 0LL; - long long current_ready_time; - Evas_Frame *temp_frame = NULL; - int ready_frames_num; - long long last_flush_time = 0LL; - struct timeval now; - int dont_schedule = 0; - - thinfo = data; - fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info); - frameq = fq_info->frameq; - - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); - /* install thread cancelation cleanup handler */ - pthread_cleanup_push(evas_common_frameq_release, data); - - _IQ_init(); - - for (;;) - { - /* 1. wait the first frame being done */ - LKL(frameq->mutex); - while(!frameq->frames || !frameq->frames->ready) - { - eina_condition_wait(&(frameq->cond_ready)); - } - frame = frameq->frames; - - /* 1.5. prepare to schedule flush time */ - current_ready_time = tv_to_long_long(&frame->ready_time); - ready_frames_num = 0; - EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame) - { - if (temp_frame->ready == 1) - { - ready_frames_num++; - } - } - dont_schedule = (frame->dont_schedule)?1:0; - LKU(frameq->mutex); - - /* 2. generate pending_writes */ - EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface) - { - evas_common_pipe_flush(surface->im); - if (! surface->dontpush) - { - pending_writes = eina_list_append(pending_writes, surface->im); - } - } - - /* 2.5. schedule flush time */ - last_ready_time = evas_common_frameq_schedule_flush_time( - frameq->frameq_sz, frameq->thread_num, - last_ready_time, current_ready_time, - last_flush_time, ready_frames_num, dont_schedule); - - /* 3. flush redraws */ - frame->output_set_priv(frame->data, pending_writes, prev_pending_writes); - frame->output_flush(frame->data); - gettimeofday(&now, NULL); - // keep as the last flush time - last_flush_time = now.tv_sec * 1000000LL + now.tv_usec; - - prev_pending_writes = pending_writes; - pending_writes = NULL; - - /* 4. remove this frame from the frame queue */ - LKL(frameq->mutex); - frameq->frames = - (Evas_Frame *)eina_inlist_remove(EINA_INLIST_GET(frameq->frames), - EINA_INLIST_GET(frame)); - - LKU(frameq->mutex); - eina_condition_broadcast(&frameq->cond_done); - evas_common_frame_dealloc(frame); - } - - // Remove cleanup handler - pthread_cleanup_pop(0); - return NULL; -} - -#endif /* EVAS_FRAME_QUEUING */ -#endif - -#ifdef BUILD_PTHREAD -static int thread_num = 0; -static Thinfo thinfo[TH_MAX]; -static pthread_barrier_t thbarrier[2]; -#endif - -static void -evas_common_pipe_begin(RGBA_Image *im) -{ -#ifdef BUILD_PTHREAD - int i, y, h; - -#ifdef EVAS_FRAME_QUEUING - return; -#endif - - if (!im->cache_entry.pipe) return; - if (thread_num == 1) return; - y = 0; - h = im->cache_entry.h / thread_num; - if (h < 1) h = 1; - for (i = 0; i < thread_num; i++) - { - RGBA_Pipe_Thread_Info *info; - -// if (y >= im->cache_entry.h) break; - info = calloc(1, sizeof(RGBA_Pipe_Thread_Info)); - info->im = im; -#ifdef EVAS_SLI - info->x = 0; - info->w = im->cache_entry.w; - info->y = i; - info->h = thread_num; -#else - info->x = 0; - info->y = y; - info->w = im->cache_entry.w; - if (i == (thread_num - 1)) - { - info->h = im->cache_entry.h - y; - } - else - { - info->h = h; - } - y += info->h; -#endif - thinfo[i].info = info; - } - /* tell worker threads to start */ - pthread_barrier_wait(&(thbarrier[0])); -#endif -} - -#ifdef EVAS_FRAME_QUEUING -EAPI void -evas_common_frameq_begin(void) -{ -#ifdef BUILD_PTHREAD - int i; - Evas_Frameq_Thread_Info *fp_info; - pthread_attr_t attr; - cpu_set_t cpu; - - if (!gframeq.initialised) - { - int cpunum, set_cpu_affinity = 0; - - cpunum = eina_cpu_count(); - gframeq.thread_num = cpunum; - gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD; - - eina_threads_init(); - - for (i = 0; i < gframeq.thread_num; i++) - { - - fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info)); - fp_info->frameq = &gframeq; - - gframeq.thinfo[i].thread_num = i; - gframeq.thinfo[i].fq_info = fp_info; - - pthread_attr_init(&attr); - if (set_cpu_affinity) - { - CPU_ZERO(&cpu); - CPU_SET((i+1) % cpunum, &cpu); - pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); - } - - pthread_create(&(gframeq.thinfo[i].thread_id), &attr, - evas_common_frameq_thread, &(gframeq.thinfo[i])); - - pthread_attr_destroy(&attr); - pthread_detach(gframeq.thinfo[i].thread_id); - } - - { - fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info)); - fp_info->frameq = &gframeq; - - gframeq.thinfo[i].thread_num = i; - gframeq.thinfo[i].fq_info = fp_info; - - pthread_attr_init(&attr); - if (set_cpu_affinity) - { - CPU_ZERO(&cpu); - CPU_SET((i+1) % cpunum, &cpu); - pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); - } - - pthread_create(&(gframeq.thinfo[i].thread_id), &attr, - evas_common_frameq_thread_post, &(gframeq.thinfo[i])); - pthread_attr_destroy(&attr); - pthread_detach(gframeq.thinfo[i].thread_id); - } - gframeq.initialised = 1; // now worker threads are created. - - INF("initialised"); - DBG("%d cpus, set_cpu_affinity=%d, frameq_sz=%d", - cpunum, set_cpu_affinity, gframeq.frameq_sz); - } -#endif /* BUILD_PTHREAD */ -} - -EAPI void -evas_common_frameq_finish(void) -{ - int i; - - /* 1. cancel all worker threads */ - for (i = 0; i < gframeq.thread_num; i++) - { - pthread_cancel(gframeq.thinfo[i].thread_id); - } - // cancel post-worker thread - pthread_cancel(gframeq.thinfo[i].thread_id); - - /* 2. send signal to worker threads so that they enter to the thread cancelation cleanup handler */ - for (i = 0; i < gframeq.thread_num; i++) - { - eina_condition_signal(&(gframeq.cond_new)); - } - // send signal to post-worker thread - eina_condition_signal(&(gframeq.cond_ready)); - - /* all the workers were created and detached before - * so don't need to join them here. - */ - -} - -#endif /* EVAS_FRAME_QUEUING */ - -EAPI void -evas_common_pipe_flush(RGBA_Image *im) -{ - if (!im->cache_entry.pipe) return; -#ifndef EVAS_FRAME_QUEUING -#ifdef BUILD_PTHREAD - if (thread_num > 1) - { - /* sync worker threads */ - pthread_barrier_wait(&(thbarrier[1])); - } - else -#endif - { - RGBA_Pipe *p; - int i; - - /* process pipe - 1 thead */ - for (p = im->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) - { - for (i = 0; i < p->op_num; i++) - { - if (p->op[i].op_func) - { - p->op[i].op_func(im, &(p->op[i]), NULL); - } - } - } - } -#endif /* !EVAS_FRAME_QUEUING */ - evas_common_cpu_end_opt(); - evas_common_pipe_free(im); -} - -EAPI void -evas_common_pipe_free(RGBA_Image *im) -{ - - RGBA_Pipe *p; - int i; - - if (!im->cache_entry.pipe) return; - /* FIXME: PTHREAD join all threads here (if not finished) */ - - /* free pipe */ - while (im->cache_entry.pipe) - { - p = im->cache_entry.pipe; - for (i = 0; i < p->op_num; i++) - { - if (p->op[i].free_func) - { - p->op[i].free_func(&(p->op[i])); - } - } - im->cache_entry.pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->cache_entry.pipe), EINA_INLIST_GET(p)); - free(p); - } -} - - - -/* draw ops */ -/**************** RECT ******************/ -static void -evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - evas_common_rectangle_draw(dst, &(context), - op->op.rect.x, op->op.rect.y, - op->op.rect.w, op->op.rect.h); - } - else - { - evas_common_rectangle_draw(dst, &(op->context), - op->op.rect.x, op->op.rect.y, - op->op.rect.w, op->op.rect.h); - } -} - -EAPI void -evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ - RGBA_Pipe_Op *op; - - if ((w < 1) || (h < 1)) return; - dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); - if (!dst->cache_entry.pipe) return; - op->op.rect.x = x; - op->op.rect.y = y; - op->op.rect.w = w; - op->op.rect.h = h; - op->op_func = evas_common_pipe_rectangle_draw_do; - op->free_func = evas_common_pipe_op_free; - evas_common_pipe_draw_context_copy(dc, op); -} - -/**************** LINE ******************/ -static void -evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - evas_common_line_draw(dst, &(context), - op->op.line.x0, op->op.line.y0, - op->op.line.x1, op->op.line.y1); - } - else - { - evas_common_line_draw(dst, &(op->context), - op->op.line.x0, op->op.line.y0, - op->op.line.x1, op->op.line.y1); - } -} - -EAPI void -evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, - int x0, int y0, int x1, int y1) -{ - RGBA_Pipe_Op *op; - - dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); - if (!dst->cache_entry.pipe) return; - op->op.line.x0 = x0; - op->op.line.y0 = y0; - op->op.line.x1 = x1; - op->op.line.y1 = y1; - op->op_func = evas_common_pipe_line_draw_do; - op->free_func = evas_common_pipe_op_free; - evas_common_pipe_draw_context_copy(dc, op); -} - -/**************** POLY ******************/ -static void -evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op) -{ - RGBA_Polygon_Point *p; - - while (op->op.poly.points) - { - p = op->op.poly.points; - op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points), - EINA_INLIST_GET(p)); - free(p); - } - evas_common_pipe_op_free(op); -} - -static void -evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - evas_common_polygon_draw(dst, &(context), - op->op.poly.points, 0, 0); - } - else - { - evas_common_polygon_draw(dst, &(op->context), - op->op.poly.points, 0, 0); - } -} - -EAPI void -evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, - RGBA_Polygon_Point *points, int x, int y) -{ - RGBA_Pipe_Op *op; - RGBA_Polygon_Point *pts = NULL, *p, *pp; - - if (!points) return; - dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); - if (!dst->cache_entry.pipe) return; - /* FIXME: copy points - maybe we should refcount? */ - for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next) - { - pp = calloc(1, sizeof(RGBA_Polygon_Point)); - if (pp) - { - pp->x = p->x + x; - pp->y = p->y + y; - pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp)); - } - } - op->op.poly.points = pts; - op->op_func = evas_common_pipe_poly_draw_do; - op->free_func = evas_common_pipe_op_poly_free; - evas_common_pipe_draw_context_copy(dc, op); -} - -/**************** TEXT ******************/ -static void -evas_common_pipe_op_text_free(RGBA_Pipe_Op *op) -{ -#ifdef EVAS_FRAME_QUEUING - LKL(op->op.text.font->ref_fq_del); - op->op.text.font->ref_fq[1]++; - LKU(op->op.text.font->ref_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)); - evas_common_pipe_op_free(op); -} - -#ifdef EVAS_FRAME_QUEUING -/* flush all op using @fn */ -EAPI void -evas_common_pipe_op_text_flush(RGBA_Font *fn) -{ - if (! evas_common_frameq_enabled()) - return; - - LKL(fn->ref_fq_add); - LKL(fn->ref_fq_del); - - while (fn->ref_fq[0] != fn->ref_fq[1]) - eina_condition_wait(&(fn->cond_fq_del)); - - LKU(fn->ref_fq_del); - LKU(fn->ref_fq_add); -} -#endif - -static void -evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - evas_common_font_draw(dst, &(context), - op->op.text.font, op->op.text.x, op->op.text.y, - &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.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) -{ - RGBA_Pipe_Op *op; - - 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; - evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props), - intl_props); -#ifdef EVAS_FRAME_QUEUING - LKL(fn->ref_fq_add); - fn->ref_fq[0]++; - LKU(fn->ref_fq_add); -#else - fn->references++; -#endif - op->op.text.font = fn; - op->op_func = evas_common_pipe_text_draw_do; - op->free_func = evas_common_pipe_op_text_free; - evas_common_pipe_draw_context_copy(dc, op); -} - -/**************** IMAGE *****************/ -static void -evas_common_pipe_op_image_free(RGBA_Pipe_Op *op) -{ -#ifdef EVAS_FRAME_QUEUING - 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); - 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) - { - evas_cache_image_drop(&op->op.image.src->cache_entry); - } -#endif - evas_common_pipe_op_free(op); -} - -#ifdef EVAS_FRAME_QUEUING -EAPI void -evas_common_pipe_op_image_flush(RGBA_Image *im) -{ - if (! evas_common_frameq_enabled()) - return; - - LKL(im->cache_entry.ref_fq_add); - LKL(im->cache_entry.ref_fq_del); - - while (im->cache_entry.ref_fq[0] != im->cache_entry.ref_fq[1]) - eina_condition_wait(&(im->cache_entry.cond_fq_del)); - - LKU(im->cache_entry.ref_fq_del); - LKU(im->cache_entry.ref_fq_add); -} -#endif - -static void -evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - -#ifdef SCALECACHE - evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), - dst, &(context), - op->op.image.smooth, - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); -#else - if (op->op.image.smooth) - { - evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src, - dst, &(context), - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); - } - else - { - evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src, - dst, &(context), - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); - } -#endif - } - else - { -#ifdef SCALECACHE - evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), - dst, &(op->context), - op->op.image.smooth, - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); -#else - if (op->op.image.smooth) - { - evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src, - dst, &(op->context), - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); - } - else - { - evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src, - dst, &(op->context), - op->op.image.sx, - op->op.image.sy, - op->op.image.sw, - op->op.image.sh, - op->op.image.dx, - op->op.image.dy, - op->op.image.dw, - op->op.image.dh); - } -#endif - } -} - -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) -{ - RGBA_Pipe_Op *op; - - if (!src) return; -// evas_common_pipe_flush(src); - dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); - if (!dst->cache_entry.pipe) return; - op->op.image.smooth = smooth; - op->op.image.sx = src_region_x; - op->op.image.sy = src_region_y; - op->op.image.sw = src_region_w; - op->op.image.sh = src_region_h; - op->op.image.dx = dst_region_x; - op->op.image.dy = dst_region_y; - op->op.image.dw = dst_region_w; - op->op.image.dh = dst_region_h; -#ifdef EVAS_FRAME_QUEUING - LKL(src->cache_entry.ref_fq_add); - src->cache_entry.ref_fq[0]++; - LKU(src->cache_entry.ref_fq_add); -#else - src->ref++; -#endif - op->op.image.src = src; - op->op_func = evas_common_pipe_image_draw_do; - op->free_func = evas_common_pipe_op_image_free; - evas_common_pipe_draw_context_copy(dc, op); - -#ifdef EVAS_FRAME_QUEUING - /* laod every src image here. - * frameq utilize all cpu cores already by worker threads - * so another threads and barrier waiting can't be of any benefit. - * therefore, not instantiate loader threads. - */ - if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&src->cache_entry); - evas_common_image_colorspace_normalize(src); -#else - evas_common_pipe_image_load(src); -#endif -} - -static void -evas_common_pipe_op_map_free(RGBA_Pipe_Op *op) -{ -#ifdef EVAS_FRAME_QUEUING - 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); -#else - op->op.map.src->ref--; - if (op->op.map.src->ref == 0) - evas_cache_image_drop(&op->op.map.src->cache_entry); -#endif - free(op->op.map.p); - evas_common_pipe_op_free(op); -} - -static void -evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info) -{ - if (info) - { - RGBA_Draw_Context context; - - memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); -#ifdef EVAS_SLI - evas_common_draw_context_set_sli(&(context), info->y, info->h); -#else - evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h); -#endif - - evas_common_map_rgba(op->op.map.src, dst, - &context, op->op.map.npoints, op->op.map.p, - op->op.map.smooth, op->op.map.level); - } - else - { - evas_common_map_rgba(op->op.map.src, dst, - &(op->context), op->op.map.npoints, op->op.map.p, - op->op.map.smooth, op->op.map.level); - } -} - -EAPI void -evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p, - int smooth, int level) -{ - RGBA_Pipe_Op *op; - RGBA_Map_Point *pts_copy; - int i; - - if (!src) return; - pts_copy = malloc(sizeof (RGBA_Map_Point) * 4); - if (!pts_copy) return; - dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); - if (!dst->cache_entry.pipe) - { - free(pts_copy); - return; - } - - for (i = 0; i < 4; ++i) - pts_copy[i] = p[i]; - - op->op.map.npoints = npoints; - op->op.map.smooth = smooth; - op->op.map.level = level; -#ifdef EVAS_FRAME_QUEUING - LKL(src->cache_entry.ref_fq_add); - src->cache_entry.ref_fq[0]++; - LKU(src->cache_entry.ref_fq_add); -#else - src->ref++; -#endif - op->op.map.src = src; - op->op.map.p = pts_copy; - op->op_func = evas_common_pipe_map_draw_do; - op->free_func = evas_common_pipe_op_map_free; - evas_common_pipe_draw_context_copy(dc, op); - -#ifdef EVAS_FRAME_QUEUING - /* laod every src image here. - * frameq utilize all cpu cores already by worker threads - * so another threads and barrier waiting can't be of any benefit. - * therefore, not instantiate loader threads. - */ - if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&src->cache_entry); - evas_common_image_colorspace_normalize(src); -#else - evas_common_pipe_image_load(src); -#endif -} - -static void -evas_common_pipe_map_render(RGBA_Image *root) -{ - RGBA_Pipe *p; - int i; - - /* Map imply that we need to process them recursively first. */ - for (p = root->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) - { - for (i = 0; i < p->op_num; i++) - { - if (p->op[i].op_func == evas_common_pipe_map_draw_do) - { - if (p->op[i].op.map.src->cache_entry.pipe) - evas_common_pipe_map_render(p->op[i].op.map.src); - } - else if (p->op[i].op_func == evas_common_pipe_image_draw_do) - { - if (p->op[i].op.image.src->cache_entry.pipe) - evas_common_pipe_map_render(p->op[i].op.image.src); - } - } - } - - evas_common_pipe_begin(root); - evas_common_pipe_flush(root); -} - -#ifdef BUILD_PTHREAD -static Eina_List *task = NULL; -static Thinfo task_thinfo[TH_MAX]; -static pthread_barrier_t task_thbarrier[2]; -static LK(task_mutext); -#endif - -#ifdef BUILD_PTHREAD -static void* -evas_common_pipe_load(void *data) -{ - Thinfo *tinfo; - - tinfo = data; - for (;;) - { - /* wait for start signal */ - pthread_barrier_wait(&(tinfo->barrier[0])); - - while (task) - { - RGBA_Image *im = NULL; - - LKL(task_mutext); - im = eina_list_data_get(task); - task = eina_list_remove_list(task, task); - LKU(task_mutext); - - if (im) - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - - im->flags &= ~RGBA_IMAGE_TODO_LOAD; - } - } - - /* send finished signal */ - pthread_barrier_wait(&(tinfo->barrier[1])); - } - - return NULL; -} -#endif - -static volatile int bval = 0; - -static void -evas_common_pipe_image_load_do(void) -{ -#ifdef BUILD_PTHREAD - /* Notify worker thread. */ - pthread_barrier_wait(&(task_thbarrier[0])); - - /* sync worker threads */ - pthread_barrier_wait(&(task_thbarrier[1])); -#endif -} - -static Eina_Bool -evas_common_pipe_init(void) -{ -#ifdef BUILD_PTHREAD - if (thread_num == 0) - { - int cpunum; - int i; - - cpunum = eina_cpu_count(); - thread_num = cpunum; -// on single cpu we still want this initted.. otherwise we block forever -// 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++) - { - pthread_attr_t attr; - cpu_set_t cpu; - - pthread_attr_init(&attr); - CPU_ZERO(&cpu); - CPU_SET(i % cpunum, &cpu); - pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); - thinfo[i].thread_num = i; - thinfo[i].info = NULL; - thinfo[i].barrier = thbarrier; - /* setup initial locks */ - pthread_create(&(thinfo[i].thread_id), &attr, - evas_common_pipe_thread, &(thinfo[i])); - pthread_attr_destroy(&attr); - } - - pthread_barrier_init(&(task_thbarrier[0]), NULL, thread_num + 1); - pthread_barrier_init(&(task_thbarrier[1]), NULL, thread_num + 1); - for (i = 0; i < thread_num; i++) - { - pthread_attr_t attr; - cpu_set_t cpu; - - pthread_attr_init(&attr); - CPU_ZERO(&cpu); - CPU_SET(i % cpunum, &cpu); - pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); - task_thinfo[i].thread_num = i; - task_thinfo[i].info = NULL; - task_thinfo[i].barrier = task_thbarrier; - /* setup initial locks */ - pthread_create(&(task_thinfo[i].thread_id), &attr, - evas_common_pipe_load, &(task_thinfo[i])); - pthread_attr_destroy(&attr); - } - } - - if (thread_num == 1) return EINA_FALSE; - return EINA_TRUE; -#endif - return EINA_FALSE; -} - -EAPI void -evas_common_pipe_image_load(RGBA_Image *im) -{ - if (im->flags & RGBA_IMAGE_TODO_LOAD) - return ; - - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888 - && !evas_cache_image_is_loaded(&(im->cache_entry))) - goto add_task; - - if ((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) - goto add_task; - - return ; - - add_task: - task = eina_list_append(task, im); - im->flags |= RGBA_IMAGE_TODO_LOAD; -} - -EAPI void -evas_common_pipe_map_begin(RGBA_Image *root) -{ - if (!evas_common_pipe_init()) - { - RGBA_Image *im; - - EINA_LIST_FREE(task, im) - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - - im->flags &= ~RGBA_IMAGE_TODO_LOAD; - } - } - - evas_common_pipe_image_load_do(); - - evas_common_pipe_map_render(root); -} - -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.h b/libraries/evas/src/lib/engines/common/evas_pipe.h deleted file mode 100644 index 37b0136..0000000 --- a/libraries/evas/src/lib/engines/common/evas_pipe.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _EVAS_PIPE_H -#define _EVAS_PIPE_H - -#include -#include "language/evas_bidi_utils.h" - -#ifdef BUILD_PTHREAD -typedef struct _Thinfo -{ - int thread_num; - pthread_t thread_id; - pthread_barrier_t *barrier; - RGBA_Pipe_Thread_Info *info; -# ifdef EVAS_FRAME_QUEUING - void *fq_info; -#endif -} Thinfo; -#endif - -#ifdef EVAS_FRAME_QUEUING -struct _Evas_Surface -{ - EINA_INLIST; - RGBA_Image *im; - int x, y, w, h; - int dontpush; // dont push the surface out after drawing done -}; -typedef struct _Evas_Surface Evas_Surface; - -struct _Evas_Frame -{ - EINA_INLIST; - Evas_Surface *surfaces; - void *data; - int in_process; - int ready; - int dont_schedule; - struct timeval ready_time; - - void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); - void (*output_flush) (void *data); - void (*output_set_priv)(void *data, void *cur, void *prev); -}; -typedef struct _Evas_Frame Evas_Frame; - - -struct _Evas_FrameQ -{ - int initialised; - Evas_Frame *frames; - Eina_Condition cond_new; - Eina_Condition cond_ready; - Eina_Condition cond_done; - LK(mutex); - - int thread_num; - Thinfo thinfo[TH_MAX]; - int frameq_sz; - - Evas_Frame *cur_frame; -}; -typedef struct _Evas_FrameQ Evas_FrameQ; -#define FRAMEQ_SZ_PER_THREAD 2 - -struct _Evas_Frameq_Thread_Info -{ - Evas_FrameQ *frameq; -}; -typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info; - -EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h); -EAPI void evas_common_frameq_add_surface(Evas_Surface *surface); -EAPI void evas_common_frameq_set_frame_data(void *data, - void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h), - void (*fn_output_flush) (void *data), - void (*fn_output_set_priv)(void *data, void *cur, void *prev)); -EAPI void evas_common_frameq_prepare_frame(void); -EAPI void evas_common_frameq_ready_frame(void); -EAPI void evas_common_frameq_init(void); -EAPI void evas_common_frameq_destroy(void); -EAPI void evas_common_frameq_flush(void); -EAPI void evas_common_frameq_flush_ready(void); -EAPI int evas_common_frameq_get_frameq_sz(void); -EAPI int evas_common_frameq_enabled(void); -EAPI void evas_common_frameq_begin(void); -EAPI void evas_common_frameq_finish(void); -#endif - -/* image rendering pipelines... new optional system - non-immediate and - * threadable - */ - -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 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); -EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p, - int smooth, int level); -EAPI void evas_common_pipe_flush(RGBA_Image *im); - -#ifdef EVAS_FRAME_QUEUING -EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn); -EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im); -#endif - -#endif /* _EVAS_PIPE_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_polygon.h b/libraries/evas/src/lib/engines/common/evas_polygon.h deleted file mode 100644 index 0695f54..0000000 --- a/libraries/evas/src/lib/engines/common/evas_polygon.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _EVAS_POLYGON_H -#define _EVAS_POLYGON_H - - -EAPI void evas_common_polygon_init (void); - -EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y); -EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points); -EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); - - -#endif /* _EVAS_POLYGON_H */ - diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c deleted file mode 100644 index 6840d60..0000000 --- a/libraries/evas/src/lib/engines/common/evas_polygon_main.c +++ /dev/null @@ -1,325 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include "evas_common.h" -#include "evas_blend_private.h" - -typedef struct _RGBA_Span RGBA_Span; -typedef struct _RGBA_Edge RGBA_Edge; -typedef struct _RGBA_Vertex RGBA_Vertex; - -struct _RGBA_Span -{ - EINA_INLIST; - int x, y, w; -}; - -struct _RGBA_Edge -{ - double x, dx; - int i; -}; - -struct _RGBA_Vertex -{ - double x, y; - int i; -}; - -#define POLY_EDGE_DEL(_i) \ -{ \ - int _j; \ - \ - for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ - if (_j < num_active_edges) \ - { \ - num_active_edges--; \ - memmove(&(edges[_j]), &(edges[_j + 1]), \ - (num_active_edges - _j) * sizeof(RGBA_Edge)); \ - } \ -} - -#define POLY_EDGE_ADD(_i, _y) \ -{ \ - int _j; \ - float _dx; \ - RGBA_Vertex *_p, *_q; \ - if (_i < (n - 1)) _j = _i + 1; \ - else _j = 0; \ - if (point[_i].y < point[_j].y) \ - { \ - _p = &(point[_i]); \ - _q = &(point[_j]); \ - } \ - else \ - { \ - _p = &(point[_j]); \ - _q = &(point[_i]); \ - } \ - edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ - edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ - edges[num_active_edges].i = _i; \ - num_active_edges++; \ -} - -EAPI void -evas_common_polygon_init(void) -{ -} - -EAPI RGBA_Polygon_Point * -evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y) -{ - RGBA_Polygon_Point *pt; - - pt = malloc(sizeof(RGBA_Polygon_Point)); - if (!pt) return points; - pt->x = x; - pt->y = y; - points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt)); - return points; -} - -EAPI RGBA_Polygon_Point * -evas_common_polygon_points_clear(RGBA_Polygon_Point *points) -{ - if (points) - { - while (points) - { - RGBA_Polygon_Point *old_p; - - old_p = points; - points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points)); - free(old_p); - } - } - return NULL; -} - -static int -polygon_point_sorter(const void *a, const void *b) -{ - RGBA_Vertex *p, *q; - - p = (RGBA_Vertex *)a; - q = (RGBA_Vertex *)b; - if (p->y <= q->y) return -1; - return 1; -} - -static int -polygon_edge_sorter(const void *a, const void *b) -{ - RGBA_Edge *p, *q; - - p = (RGBA_Edge *)a; - q = (RGBA_Edge *)b; - if (p->x <= q->x) return -1; - return 1; -} - -EAPI void -evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) -{ - RGBA_Gfx_Func func; - RGBA_Polygon_Point *pt; - RGBA_Vertex *point; - RGBA_Edge *edges; - Eina_Inlist *spans; - int num_active_edges; - int n; - int i, j, k; - int yy0, yy1, yi; - int ext_x, ext_y, ext_w, ext_h; - int *sorted_index; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_POLY - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; -# endif -#endif - - ext_x = 0; - ext_y = 0; - ext_w = dst->cache_entry.w; - ext_h = dst->cache_entry.h; - if (dc->clip.use) - { - if (dc->clip.x > ext_x) - { - ext_w += ext_x - dc->clip.x; - ext_x = dc->clip.x; - } - if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w)) - { - ext_w = (dc->clip.x + dc->clip.w) - ext_x; - } - if (dc->clip.y > ext_y) - { - ext_h += ext_y - dc->clip.y; - ext_y = dc->clip.y; - } - if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h)) - { - ext_h = (dc->clip.y + dc->clip.h) - ext_y; - } - } - if ((ext_w <= 0) || (ext_h <= 0)) return; - - evas_common_cpu_end_opt(); - - n = 0; EINA_INLIST_FOREACH(points, pt) n++; - if (n < 3) return; - edges = malloc(sizeof(RGBA_Edge) * n); - if (!edges) return; - point = malloc(sizeof(RGBA_Vertex) * n); - if (!point) - { - free(edges); - return; - } - sorted_index = malloc(sizeof(int) * n); - if (!sorted_index) - { - free(edges); - free(point); - return; - } - - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); - for (k = 0; k < n; k++) sorted_index[k] = point[k].i; - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - - yy0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); - yy1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); - - k = 0; - num_active_edges = 0; - spans = NULL; - - for (yi = yy0; yi <= yy1; yi++) - { - for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++) - { - i = sorted_index[k]; - - if (i > 0) j = i - 1; - else j = n - 1; - if (point[j].y <= ((double)yi - 0.5)) - { - POLY_EDGE_DEL(j) - } - else if (point[j].y > ((double)yi + 0.5)) - { - POLY_EDGE_ADD(j, yi) - } - if (i < (n - 1)) j = i + 1; - else j = 0; - if (point[j].y <= ((double)yi - 0.5)) - { - POLY_EDGE_DEL(i) - } - else if (point[j].y > ((double)yi + 0.5)) - { - POLY_EDGE_ADD(i, yi) - } - } - - qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); - - for (j = 0; j < num_active_edges; j += 2) - { - int x0, x1; - - x0 = ceil(edges[j].x - 0.5); - if (j < (num_active_edges - 1)) - x1 = floor(edges[j + 1].x - 0.5); - else - x1 = x0; - if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) - { - RGBA_Span *span; - - if (x0 < ext_x) x0 = ext_x; - if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; - span = malloc(sizeof(RGBA_Span)); - spans = eina_inlist_append(spans, EINA_INLIST_GET(span)); - span->y = yi; - span->x = x0; - span->w = (x1 - x0) + 1; - } - edges[j].x += edges[j].dx; - edges[j + 1].x += edges[j + 1].dx; - } - } - - free(edges); - free(point); - free(sorted_index); - - func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op); - if (spans) - { - RGBA_Span *span; - - EINA_INLIST_FOREACH(spans, span) - { - DATA32 *ptr; - -#ifdef EVAS_SLI - if (((span->y) % dc->sli.h) == dc->sli.y) -#endif - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_POLY - if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (!dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - NULL, dst->pixman.im, - span->x, span->y, 0, 0, - span->x, span->y, span->w, 1); - else if ((dst->pixman.im) && (dc->col.pixman_color_image) && - (dc->mask.mask)) - pixman_image_composite(op, dc->col.pixman_color_image, - dc->mask.mask->pixman.im, - dst->pixman.im, - span->x, span->y, 0, 0, - span->x, span->y, span->w, 1); - else -# endif -#endif - { - ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; - func(NULL, NULL, dc->col.col, ptr, span->w); - } - } - } - while (spans) - { - span = (RGBA_Span *)spans; - spans = eina_inlist_remove(spans, spans); - free(span); - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle.h b/libraries/evas/src/lib/engines/common/evas_rectangle.h deleted file mode 100644 index a653b04..0000000 --- a/libraries/evas/src/lib/engines/common/evas_rectangle.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _EVAS_RECTANGLE_H -#define _EVAS_RECTANGLE_H - - -EAPI void evas_common_rectangle_init (void); - -EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); - - -#endif /* _EVAS_RECTANGLE_H */ - diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c deleted file mode 100644 index fc25fd0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c +++ /dev/null @@ -1,91 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - -static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); - -EAPI void -evas_common_rectangle_init(void) -{ -} - -EAPI void -evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch; - int i; - /* handle cutouts here! */ - - if ((w <= 0) || (h <= 0)) return; - if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - /* save out clip info */ - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - rectangle_draw_internal(dst, dc, x, y, w, h); - } - else - { - evas_common_draw_context_clip_clip(dc, x, y, w, h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w > 0) && (dc->clip.h > 0)) - { - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - rectangle_draw_internal(dst, dc, x, y, w, h); - } - evas_common_draw_context_apply_clear_cutouts(rects); - } - } - /* restore clip info */ - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; -} - -static void -rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) -{ - RGBA_Gfx_Func func; - int yy; - DATA32 *ptr; - - 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; - -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_RECT - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; - - if ((dst->pixman.im) && (dc->col.pixman_color_image)) - { - pixman_image_composite(op, dc->col.pixman_color_image, NULL, - dst->pixman.im, x, y, 0, 0, - x, y, w, h); - } - else -# endif -#endif - { - func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); - ptr = dst->image.data + (y * dst->cache_entry.w) + x; - for (yy = 0; yy < h; yy++) - { -#ifdef EVAS_SLI - if (((yy + y) % dc->sli.h) == dc->sli.y) -#endif - { - func(NULL, NULL, dc->col.col, ptr, w); - } - ptr += dst->cache_entry.w; - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_regionbuf.c b/libraries/evas/src/lib/engines/common/evas_regionbuf.c deleted file mode 100644 index f381da5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_regionbuf.c +++ /dev/null @@ -1,357 +0,0 @@ -#include "evas_common.h" - -#if 0 -Regionbuf * -evas_common_regionbuf_new(int w, int h) -{ - Regionbuf *rb; - - rb = calloc(1, sizeof(Regionbuf) + (h * sizeof(Regionspan))); - if (!rb) return NULL; - rb->spans = (Regionspan **)(rb + sizeof(Regionbuf)); - rb->w = w; - rb->h = h; - return rb; -} - -void -evas_common_regionbuf_free(Regionbuf *rb) -{ - evas_common_regionbuf_clear(rb); - free(rb); -} - -void -evas_common_regionbuf_clear(Regionbuf *rb) -{ - int y; - - for (y = 0; y < rb->h; y++) - { - while (rb->spans[y]) - { - Regionspan *span; - - span = rb->spans[y]; - rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]); - free(span); - } - } -} - -void -evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y) -{ - Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; - - /* abort if outside */ - if ((y < 0) || - (y >= rb->h) || - (x2 < 0) || - (x1 >= rb->w)) return; - /* clip to horiz bounds */ - if (x1 < 0) x1 = 0; - if (x2 < (rb->w - 1)) x2 = rb->w - 1; - sp_start = NULL; - sp_stop = NULL; - EINA_INLIST_FOREACH(rb->spans[y], span) - { - nspan = (Regionspan *)(EINA_INLIST_GET(span))->next; - /* we dont know what t do with the span yet */ - if (!sp_start) - { - /* if new span starts before or on this span or just after - * with no gap */ - if (x1 <= (span->x2 + 1)) - sp_start = span; - /* if there is no next span */ - if (!nspan) - { - sp_stop = span; - break; - } - /* if new span ends before the next span starts with a gap of - * 1 pixel (or more) */ - else if (x2 < (nspan->x1 - 1)) - { - sp_stop = span; - break; - } - } - /* we already know it already starts before or in sp_start */ - else - { - /* there is no span after this one, so this has to be the stop */ - if (!nspan) - { - sp_stop = span; - break; - } - /* if new span ends before the next span starts with a gap of - * 1 pixel (or more) */ - else if (x2 < (nspan->x1 - 1)) - { - sp_stop = span; - break; - } - } - } - /* sp_start is where the new span starts in or before */ - /* sp_stop is where the new span stops in or after */ - if ((sp_start) && (sp_stop)) - { - /* same start and stop */ - if (sp_start == sp_stop) - { - if (x2 < (sp_start->x1 - 1)) - { - span2 = calloc(1, sizeof(Regionspan)); - span2->x1 = x1; - span2->x2 = x2; - rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); - return; - } - if (x1 < sp_start->x1) - sp_start->x1 = x1; - if (x2 > sp_start->x2) - sp_start->x2 = x2; - return; - } - else - { - Eina_Inlist *l; - - /* remove all nodes after sp_start and before_sp_stop because - * the new */ - for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) - { - span = (Regionspan *)l; - l = l->next; - rb->spans[y] = eina_inlist_remove(rb->spans[y], span); - free(span); - } - /* remove the end span */ - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); - /* if the new span is before the start span - extend */ - if (x1 < sp_start->x1) - sp_start->x1 = x1; - /* if it goes beyond the stop span - extend stop span */ - if (x2 > sp_stop->x2) - sp_stop->x2 = x2; - /* extend start span to stop span */ - sp_start->x2 = sp_stop->x2; - /* don't need stop span anymore */ - free(sp_stop); - return; - } - } - /* no start AND stop... just append */ - span2 = calloc(1, sizeof(Regionspan)); - span2->x1 = x1; - span2->x2 = x2; - rb->spans[y] = eina_inlist_append(rb->spans[y], span2); -} - -void -evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y) -{ - /* FIXME: del span */ - Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; - - /* abort if outside */ - if ((y < 0) || - (y >= rb->h) || - (x2 < 0) || - (x1 >= rb->w)) return; - /* clip to horiz bounds */ - if (x1 < 0) x1 = 0; - if (x2 < (rb->w - 1)) x2 = rb->w - 1; - sp_start = NULL; - sp_stop = NULL; - EINA_INLIST_FOREACH(rb->spans[y], span) - { - nspan = (Regionspan *)(EINA_INLIST_GET(l))->next; - /* we dont know what t do with the span yet */ - if (!sp_start) - { - /* if new span starts before or on this span or just after - * with no gap */ - if (x1 <= (span->x2)) - sp_start = span; - /* if there is no next span */ - if (!nspan) - { - sp_stop = span; - break; - } - /* if new span ends before the next span starts with a gap of - * 1 pixel (or more) */ - else if (x2 < nspan->x1) - { - sp_stop = span; - break; - } - } - /* we already know it already starts before or in sp_start */ - else - { - /* there is no span after this one, so this has to be the stop */ - if (!nspan) - { - sp_stop = span; - break; - } - /* if new span ends before the next span starts with a gap of - * 1 pixel (or more) */ - else if (x2 < nspan->x1) - { - sp_stop = span; - break; - } - } - } - /* sp_start is where the new span starts in or before */ - /* sp_stop is where the new span stops in or after */ - if ((sp_start) && (sp_stop)) - { - /* same start and stop */ - if (sp_start == sp_stop) - { - /* if it ends before this the span start starts... return */ - if (x2 < sp_start->x1) - return; - /* it starts on or before this span */ - else if (x1 <= sp_start->x1) - { - /* right edge is within the span */ - if (x2 < sp_start->x2) - { - sp_start->x2 = x2; - return; - } - else - { - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); - return; - } - } - /* it ends on or after the end of this span */ - else if (x2 >= sp_start->x2) - { - /* it starts after the start */ - if (x1 > sp_start->x1) - { - sp_start->x1 = x1; - return; - } - /* remove it all */ - else - { - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); - return; - } - return; - } - /* this breaks the span into 2 */ - else - { - span2 = calloc(1, sizeof(Regionspan)); - span2->x1 = sp_start->x1; - span2->x2 = x1 - 1; - rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); - sp_start->x1 = x2 + 1; - return; - } - } - else - { - Eina_Inlist *l; - - /* remove all nodes after sp_start and before_sp_stop because - * the new */ - for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) - { - span = (Regionspan *)l; - l = l->next; - rb->spans[y] = eina_inlist_remove(rb->spans[y], span); - free(span); - } - /* all of the start span is cut out */ - if (x1 <= sp_start->x1) - { - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); - free(sp_start); - } - /* chup it off at the new span start */ - else - sp_start->x2 = x1 - 1; - /* all of the end span is cut out */ - if (x2 >= sp_stop->x2) - { - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); - free(sp_stop); - } - /* chop it up at the end */ - else - sp_stop->x1 = x2 + 1; - return; - } - } -} - -Tilebuf_Rect * -evas_common_regionbuf_rects_get(Regionbuf *rb) -{ - Tilebuf_Rect *rects = NULL, *r; - int y; - - /* FIXME: take spans, make rects */ - for (y = 0; y < rb->h; y++) - { - Regionspan *sp_start; - Eina_Inlist *l, *ll; - - for (l = EINA_INLIST_GET(rb->spans[y]); l;) - { - Regionspan *span; - int yy; - - sp_start = (Regionspan *)l; - l = l->next; - rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); - for (yy = y + 1; yy < rb->h; yy++) - { - int match = 0; - - for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;) - { - span = (Regionspan *)ll; - ll = ll->next; - if (span->x1 == sp_start->x1) - { - if ((span->x1 != sp_start->x1) || - (span->x2 != sp_start->x2)) - { - goto coallate; - } - match = 1; - rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span); - free(span); - } - } - if (!match) goto coallate; - } - coallate: - r = calloc(1, sizeof(Tilebuf_Rect)); - r->x = sp_start->x1; - r->y = y; - r->w = sp_start->x2 - sp_start->x1 + 1; - r->h = yy - y; - rects = eina_inlist_append(rects, r); - free(sp_start); - } - } - evas_common_regionbuf_clear(rb); - return rects; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.c b/libraries/evas/src/lib/engines/common/evas_scale_main.c deleted file mode 100644 index 959336c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "evas_common.h" - -EAPI void -evas_common_scale_init(void) -{ -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_main.h b/libraries/evas/src/lib/engines/common/evas_scale_main.h deleted file mode 100644 index eafd9d2..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_main.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _EVAS_SCALE_MAIN_H -#define _EVAS_SCALE_MAIN_H - - -EAPI void evas_common_scale_init (void); - -EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, 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_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, 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_rgba_image_scalecache_dump(void); - -#endif /* _EVAS_SCALE_MAIN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c deleted file mode 100644 index c721c5e..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_sample.c +++ /dev/null @@ -1,418 +0,0 @@ -#include "evas_common.h" -#include "evas_blend_private.h" - -void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, 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); - -#ifndef BUILD_SCALE_SMOOTH -#ifdef BUILD_SCALE_SAMPLE -EAPI void -evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ - evas_common_scale_rgba_in_to_out_clip_sample(src, 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); -} -#endif -#endif - -#ifdef BUILD_SCALE_SAMPLE -EAPI void -evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch; - int i; - /* handle cutouts here! */ - - if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; - 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))) - return; - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - scale_rgba_in_to_out_clip_sample_internal(src, 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; - } - /* save out clip info */ - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - scale_rgba_in_to_out_clip_sample_internal(src, 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_draw_context_apply_clear_cutouts(rects); - /* restore clip info */ - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; -} - -void -scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ - int x, y; - int *lin_ptr; - DATA32 *buf, *dptr; - DATA32 **row_ptr; - DATA32 *ptr, *dst_ptr, *src_data, *dst_data; - 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 = 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))) - return; - if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - src_w = src->cache_entry.w; - src_h = src->cache_entry.h; - dst_w = dst->cache_entry.w; - dst_h = dst->cache_entry.h; - - src_data = src->image.data; - dst_data = dst->image.data; - - if (dc->clip.use) - { - dst_clip_x = dc->clip.x; - dst_clip_y = dc->clip.y; - dst_clip_w = dc->clip.w; - dst_clip_h = dc->clip.h; - if (dst_clip_x < 0) - { - dst_clip_w += dst_clip_x; - dst_clip_x = 0; - } - if (dst_clip_y < 0) - { - dst_clip_h += dst_clip_y; - dst_clip_y = 0; - } - if ((dst_clip_x + dst_clip_w) > dst_w) - dst_clip_w = dst_w - dst_clip_x; - if ((dst_clip_y + dst_clip_h) > dst_h) - dst_clip_h = dst_h - dst_clip_y; - } - else - { - dst_clip_x = 0; - dst_clip_y = 0; - dst_clip_w = dst_w; - 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; - dst_clip_x = dst_region_x; - } - if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) - dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; - if (dst_clip_y < dst_region_y) - { - dst_clip_h += dst_clip_y - dst_region_y; - dst_clip_y = dst_region_y; - } - if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) - dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; - - if ((src_region_w <= 0) || (src_region_h <= 0) || - (dst_region_w <= 0) || (dst_region_h <= 0) || - (dst_clip_w <= 0) || (dst_clip_h <= 0)) - return; - - /* sanitise x */ - if (src_region_x < 0) - { - dst_region_x -= (src_region_x * dst_region_w) / src_region_w; - dst_region_w += (src_region_x * dst_region_w) / src_region_w; - src_region_w += src_region_x; - src_region_x = 0; - } - if (src_region_x >= src_w) return; - if ((src_region_x + src_region_w) > src_w) - { - dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); - src_region_w = src_w - src_region_x; - } - if (dst_region_w <= 0) return; - if (src_region_w <= 0) return; - if (dst_clip_x < 0) - { - dst_clip_w += dst_clip_x; - dst_clip_x = 0; - } - if (dst_clip_w <= 0) return; - if (dst_clip_x >= dst_w) return; - if (dst_clip_x < dst_region_x) - { - dst_clip_w += (dst_clip_x - dst_region_x); - dst_clip_x = dst_region_x; - } - if ((dst_clip_x + dst_clip_w) > dst_w) - { - dst_clip_w = dst_w - dst_clip_x; - } - if (dst_clip_w <= 0) return; - - /* sanitise y */ - if (src_region_y < 0) - { - dst_region_y -= (src_region_y * dst_region_h) / src_region_h; - dst_region_h += (src_region_y * dst_region_h) / src_region_h; - src_region_h += src_region_y; - src_region_y = 0; - } - if (src_region_y >= src_h) return; - if ((src_region_y + src_region_h) > src_h) - { - dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); - src_region_h = src_h - src_region_y; - } - if (dst_region_h <= 0) return; - if (src_region_h <= 0) return; - if (dst_clip_y < 0) - { - dst_clip_h += dst_clip_y; - dst_clip_y = 0; - } - if (dst_clip_h <= 0) return; - if (dst_clip_y >= dst_h) return; - if (dst_clip_y < dst_region_y) - { - dst_clip_h += (dst_clip_y - dst_region_y); - dst_clip_y = dst_region_y; - } - if ((dst_clip_y + dst_clip_h) > dst_h) - { - dst_clip_h = dst_h - dst_clip_y; - } - if (dst_clip_h <= 0) return; - - /* allocate scale lookup tables */ - lin_ptr = alloca(dst_clip_w * sizeof(int)); - row_ptr = alloca(dst_clip_h * sizeof(DATA32 *)); - - /* figure out dst jump */ - //dst_jump = dst_w - dst_clip_w; - - /* figure out dest start ptr */ - dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w); - - if (dc->mask.mask) - { - 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); - else - func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); - - if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) - { -#ifdef HAVE_PIXMAN -# ifdef PIXMAN_IMAGE_SCALE_SAMPLE - if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) && - ((!dc->mul.use) || - ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && - ((dc->render_op == _EVAS_RENDER_COPY) || - (dc->render_op == _EVAS_RENDER_BLEND))) - { - 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 if ((src->pixman.im) && (dst->pixman.im) && - (dc->mask.mask) && (dc->mask.mask->pixman.im) && - ((dc->render_op == _EVAS_RENDER_COPY) || - (dc->render_op == _EVAS_RENDER_BLEND))) - { - // In case of pixel and color operation. - pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) - op = PIXMAN_OP_OVER; - - pixman_image_composite(op, - src->pixman.im, dc->mask.mask->pixman.im, - dst->pixman.im, - (dst_clip_x - dst_region_x) + src_region_x, - (dst_clip_y - dst_region_y) + src_region_y, - 0, 0, - dst_clip_x, dst_clip_y, - dst_clip_w, dst_clip_h); - } - else -# endif -#endif - { - ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; - 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) -#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; - } - } - } - else - { - /* fill scale tables */ - for (x = 0; x < dst_clip_w; x++) - lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; - for (y = 0; y < dst_clip_h; y++) - row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) - + src_region_y) * src_w); - /* scale to dst */ - dptr = dst_ptr; -#ifdef DIRECT_SCALE - if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) - { - for (y = 0; y < dst_clip_h; y++) - { -# ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) -# endif - { - dst_ptr = dptr; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - } - dptr += dst_w; - } - } - else -#endif - { - /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - for (y = 0; y < dst_clip_h; y++) - { -#ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) -#endif - { - dst_ptr = buf; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - /* * blend here [clip_w *] buf -> dptr * */ - func(buf, NULL, dc->mul.col, dptr, dst_clip_w); - } - dptr += dst_w; - } - } - } -} -#else -#ifdef BUILD_SCALE_SMOOTH -EAPI void -evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ - evas_common_scale_rgba_in_to_out_clip_smooth(src, 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); -} -#endif -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth.c deleted file mode 100644 index d3aada6..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth.c +++ /dev/null @@ -1,532 +0,0 @@ -#include "evas_common.h" -#include "evas_scale_smooth.h" -#include "evas_blend_private.h" - -#define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \ - P = alloca((CW + 1) * sizeof (int)); \ - scale_calc_x_points(P, SW, DW, CX, CW); - -#define SCALE_CALC_Y_POINTS(P, SRC, SW, SH, DH, CY, CH) \ - P = alloca((CH + 1) * sizeof (DATA32 *)); \ - scale_calc_y_points(P, SRC, SW, SH, DH, CY, CH); - -#define SCALE_CALC_A_POINTS(P, S, D, C, CC) \ - P = alloca(CC * sizeof (int)); \ - scale_calc_a_points(P, S, D, C, CC); - -static void scale_calc_y_points(DATA32 **p, DATA32 *src, int sw, int sh, int dh, int cy, int ch); -static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw); -static void scale_calc_a_points(int *p, int s, int d, int c, int cc); - -static void -scale_calc_y_points(DATA32** p, DATA32 *src, int sw, int sh, int dh, int cy, int ch) -{ - int i, val, inc; - if (sh > SCALE_SIZE_MAX) return; - val = 0; - inc = (sh << 16) / dh; - for (i = 0; i < dh; i++) - { - if ((i >= cy) && (i < (cy + ch))) - p[i - cy] = src + ((val >> 16) * sw); - val += inc; - } - if ((i >= cy) && (i < (cy + ch))) - p[i - cy] = p[i - cy - 1]; -} - -static void -scale_calc_x_points(int *p, int sw, int dw, int cx, int cw) -{ - int i, val, inc; - if (sw > SCALE_SIZE_MAX) return; - val = 0; - inc = (sw << 16) / dw; - for (i = 0; i < dw; i++) - { - if ((i >= cx) && (i < (cx + cw))) - p[i - cx] = val >> 16; - val += inc; - } - if ((i >= cx) && (i < (cx + cw))) - p[i - cx] = p[i - cx - 1]; -} - -static void -scale_calc_a_points(int *p, int s, int d, int c, int cc) -{ - int i, val, inc; - - if (s > SCALE_SIZE_MAX) return; - if (d >= s) - { - val = 0; - inc = (s << 16) / d; - for (i = 0; i < d; i++) - { - if ((i >= c) && (i < (c + cc))) - { - p[i - c] = (val >> 8) - ((val >> 8) & 0xffffff00); - if ((val >> 16) >= (s - 1)) p[i - c] = 0; - } - val += inc; - } - } - else - { - int ap, Cp; - - val = 0; - inc = (s << 16) / d; - Cp = ((d << 14) / s) + 1; - for (i = 0; i < d; i++) - { - ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8; - if ((i >= c) && (i < (c + cc))) - p[i - c] = ap | (Cp << 16); - val += inc; - } - } -} - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - src_ptr2 = src + src_w; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - src_ptr2 = src_ptr + src_w; - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; - A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2; - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; - A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1; - - src_ptr+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - src_ptr2 = src_ptr + src_w; - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; - A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1; - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - src_ptr2 = src + src_w; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; - A_VAL(dst_ptr) = 0xff; - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - src_ptr += src_w; - src_ptr2 += src_w; - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; - A_VAL(dst_ptr) = 0xff; - - src_ptr+=2; - dst_ptr++; - } - src_ptr += src_w; - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_C -EAPI void -evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - src_ptr2 = src + src_w; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - for (x = 0; x < dst_w; x++) - { - R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; - G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; - B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; - A_VAL(dst_ptr) = 0xff; - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - src_ptr += src_w; - src_ptr2 += src_w; - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_MMX -EAPI void -evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - /* NB: Dead assignments (reassigned to different values below) - src_ptr = src; - src_ptr2 = src + src_w; - */ - - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - src_ptr2 = src_ptr + src_w; - for (x = 0; x < dst_w; x++) - { - punpcklbw_m2r(src_ptr[0], mm0); - punpcklbw_m2r(src_ptr[1], mm1); - punpcklbw_m2r(src_ptr2[0], mm2); - punpcklbw_m2r(src_ptr2[1], mm3); - psrlw_i2r(8, mm0); - psrlw_i2r(8, mm1); - psrlw_i2r(8, mm2); - psrlw_i2r(8, mm3); - paddw_r2r(mm1, mm0); - paddw_r2r(mm2, mm0); - paddw_r2r(mm3, mm0); - psrlw_i2r(2, mm0); - packuswb_r2r(mm0, mm0); - movd_r2m(mm0, dst_ptr[0]); - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_MMX -EAPI void -evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - src_ptr = src; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - for (x = 0; x < dst_w; x++) - { - punpcklbw_m2r(src_ptr[0], mm0); - punpcklbw_m2r(src_ptr[1], mm1); - psrlw_i2r(8, mm0); - psrlw_i2r(8, mm1); - paddw_r2r(mm1, mm0); - psrlw_i2r(1, mm0); - packuswb_r2r(mm0, mm0); - movd_r2m(mm0, dst_ptr[0]); - - src_ptr+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -#ifdef BUILD_MMX -EAPI void -evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) -{ - int x, y, dst_w, dst_h; - DATA32 *src_ptr, *src_ptr2, *dst_ptr; - - dst_w = src_w >> 1; - dst_h = src_h >> 1; - - if (dst_w < 1) dst_w = 1; - if (dst_h < 1) dst_h = 1; - - /* NB: Dead assignment (gets reassigned later) */ -// src_ptr = src; - - src_ptr2 = src + src_w; - dst_ptr = dst; - for (y = 0; y < dst_h; y++) - { - src_ptr = src + (y * src_w * 2); - src_ptr2 = src_ptr + src_w; - for (x = 0; x < dst_w; x++) - { - punpcklbw_m2r(src_ptr[0], mm0); - punpcklbw_m2r(src_ptr2[0], mm1); - psrlw_i2r(8, mm0); - psrlw_i2r(8, mm1); - paddw_r2r(mm1, mm0); - psrlw_i2r(1, mm0); - packuswb_r2r(mm0, mm0); - movd_r2m(mm0, dst_ptr[0]); - - src_ptr+=2; - src_ptr2+=2; - dst_ptr++; - } - } -} -#endif -#endif - -#ifdef BUILD_SCALE_SMOOTH -# ifdef BUILD_MMX -# undef SCALE_FUNC -# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx -# undef SCALE_USING_MMX -# define SCALE_USING_MMX -# include "evas_scale_smooth_scaler.c" -# endif -# ifdef BUILD_C -# undef SCALE_FUNC -# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c -# undef SCALE_USING_MMX -# include "evas_scale_smooth_scaler.c" -# endif -EAPI void -evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ -# ifdef BUILD_MMX - int mmx, sse, sse2; -# endif - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch; - int i; - /* handle cutouts here! */ - - if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; - 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))) - return; -# ifdef BUILD_MMX - evas_common_cpu_can_do(&mmx, &sse, &sse2); -# endif - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { -# ifdef BUILD_MMX - if (mmx) - evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, 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 -# endif -# ifdef BUILD_C - evas_common_scale_rgba_in_to_out_clip_smooth_c(src, 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); -# endif - return; - } - /* save out clip info */ - c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); -# ifdef BUILD_MMX - if (mmx) - evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, 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 -# endif -# ifdef BUILD_C - evas_common_scale_rgba_in_to_out_clip_smooth_c(src, 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); -# endif - } - evas_common_draw_context_apply_clear_cutouts(rects); - /* restore clip info */ - dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; -} -#endif diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth.h b/libraries/evas/src/lib/engines/common/evas_scale_smooth.h deleted file mode 100644 index 63ced50..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _EVAS_SCALE_SMOOTH_H -#define _EVAS_SCALE_SMOOTH_H - -EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); - -EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); -EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); - -EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, 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_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, 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); - - -#endif /* _EVAS_SCALE_SMOOTH_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c deleted file mode 100644 index 599bfda..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c +++ /dev/null @@ -1,211 +0,0 @@ -void -SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst, - RGBA_Draw_Context *dc, - 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) -{ - DATA32 *dst_ptr; - int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; - int src_w, src_h, dst_w, dst_h; - - 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))) - return; - if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - src_w = src->cache_entry.w; - src_h = src->cache_entry.h; - dst_w = dst->cache_entry.w; - dst_h = dst->cache_entry.h; - - if (dc->clip.use) - { - dst_clip_x = dc->clip.x; - dst_clip_y = dc->clip.y; - dst_clip_w = dc->clip.w; - dst_clip_h = dc->clip.h; - if (dst_clip_x < 0) - { - dst_clip_w += dst_clip_x; - dst_clip_x = 0; - } - if (dst_clip_y < 0) - { - dst_clip_h += dst_clip_y; - dst_clip_y = 0; - } - if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return; - if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x; - if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y; - } - else - { - dst_clip_x = 0; - dst_clip_y = 0; - dst_clip_w = dst_w; - dst_clip_h = dst_h; - } - - if (dst_clip_x < dst_region_x) - { - dst_clip_w += dst_clip_x - dst_region_x; - dst_clip_x = dst_region_x; - } - if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) - dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; - if (dst_clip_y < dst_region_y) - { - dst_clip_h += dst_clip_y - dst_region_y; - dst_clip_y = dst_region_y; - } - if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) - dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; - - if ((src_region_w <= 0) || (src_region_h <= 0) || - (dst_region_w <= 0) || (dst_region_h <= 0) || - (dst_clip_w <= 0) || (dst_clip_h <= 0)) - return; - - /* sanitise x */ - if (src_region_x < 0) - { - dst_region_x -= (src_region_x * dst_region_w) / src_region_w; - dst_region_w += (src_region_x * dst_region_w) / src_region_w; - src_region_w += src_region_x; - src_region_x = 0; - } - if (src_region_x >= src_w) return; - if ((src_region_x + src_region_w) > src_w) - { - dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); - src_region_w = src_w - src_region_x; - } - if (dst_region_w <= 0) return; - if (src_region_w <= 0) return; - if (dst_clip_x < 0) - { - dst_clip_w += dst_clip_x; - dst_clip_x = 0; - } - if (dst_clip_w <= 0) return; - if (dst_clip_x >= dst_w) return; - if (dst_clip_x < dst_region_x) - { - dst_clip_w += (dst_clip_x - dst_region_x); - dst_clip_x = dst_region_x; - } - if ((dst_clip_x + dst_clip_w) > dst_w) - { - dst_clip_w = dst_w - dst_clip_x; - } - if (dst_clip_w <= 0) return; - - /* sanitise y */ - if (src_region_y < 0) - { - dst_region_y -= (src_region_y * dst_region_h) / src_region_h; - dst_region_h += (src_region_y * dst_region_h) / src_region_h; - src_region_h += src_region_y; - src_region_y = 0; - } - if (src_region_y >= src_h) return; - if ((src_region_y + src_region_h) > src_h) - { - dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); - src_region_h = src_h - src_region_y; - } - if (dst_region_h <= 0) return; - if (src_region_h <= 0) return; - if (dst_clip_y < 0) - { - dst_clip_h += dst_clip_y; - dst_clip_y = 0; - } - if (dst_clip_h <= 0) return; - if (dst_clip_y >= dst_h) return; - if (dst_clip_y < dst_region_y) - { - dst_clip_h += (dst_clip_y - dst_region_y); - dst_clip_y = dst_region_y; - } - if ((dst_clip_y + dst_clip_h) > dst_h) - { - dst_clip_h = dst_h - dst_clip_y; - } - if (dst_clip_h <= 0) return; - - /* some maximum region sizes to avoid insane calc point tables */ - if (dst_clip_w > 65536) return; - if (dst_clip_h > 65536) return; - if (dst_region_w > (65536 * 1024)) return; - if (dst_region_h > (65536 * 1024)) return; - - /* figure out dst jump - * NB: Unused currently, so commented out */ -// dst_jump = dst_w - dst_clip_w; - - /* figure out dest start ptr */ - dst_ptr = dst->image.data + dst_clip_x + (dst_clip_y * dst_w); - -/* FIXME: - * - * things to do later for speedups: - * - * break upscale into 3 cases (as listed below - up:up, 1:up, up:1) - * - * break downscale into more cases (as listed below) - * - * roll func (blend/copy/cultiply/cmod) code into inner loop of scaler. - * (578 fps vs 550 in mmx upscale in evas demo - this means probably - * a good 10-15% speedup over the func call, but means massively larger - * code) - * - * anything involving downscaling has no mmx equivalent code and maybe the - * C could do with a little work. - * - * --------------------------------------------------------------------------- - * - * (1 = no scaling (1:1 ratio), + = scale up, - = scale down) - * (* == fully optimised mmx, # = fully optimised C) - * - * h:v mmx C - * - * 1:1 * # - * - * +:+ * # - * 1:+ * # - * +:1 * # - * - * 1:- - * -:1 - * +:- - * -:+ - * -:- - * - */ - - /* if 1:1 scale */ - if ((dst_region_w == src_region_w) && - (dst_region_h == src_region_h)) - { -#include "evas_scale_smooth_scaler_noscale.c" - } - else - { - /* scaling up only - dont need anything except original */ -// if ((!dc->anti_alias) || ((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) - if (((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) - { -#include "evas_scale_smooth_scaler_up.c" - return; - } - else - /* scaling down... funkiness */ - { -#include "evas_scale_smooth_scaler_down.c" - return; - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c deleted file mode 100644 index 357eb32..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c +++ /dev/null @@ -1,43 +0,0 @@ -{ - DATA32 **ypoints; - int *xpoints; - int *xapoints, *xapp; - int *yapoints, *yapp; - DATA32 *buf, *src_data; - - RGBA_Gfx_Func func; - - src_data = src->image.data; - - /* some maximum region sizes to avoid insane calc point tables */ - SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); - SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); - SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); - SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); - - /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - - 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); - else - func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); - /* scaling down vertically */ - if ((dst_region_w >= src_region_w) && - (dst_region_h < src_region_h)) - { -#include "evas_scale_smooth_scaler_downy.c" - } - /* scaling down horizontally */ - else if ((dst_region_w < src_region_w) && - (dst_region_h >= src_region_h)) - { -#include "evas_scale_smooth_scaler_downx.c" - } - /* scaling down both vertically & horizontally */ - else if ((dst_region_w < src_region_w) && - (dst_region_h < src_region_h)) - { -#include "evas_scale_smooth_scaler_downx_downy.c" - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c deleted file mode 100644 index a443c85..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c +++ /dev/null @@ -1,259 +0,0 @@ -{ - int Cx, j; - DATA32 *pix, *dptr, *pbuf, **yp; - int r, g, b, a, rr, gg, bb, aa; - int *xp, xap, yap, pos; - //int dyy, dxx; - int w = dst_clip_w; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - dptr = dst_ptr; - pos = (src_region_y * src_w) + src_region_x; - //dyy = dst_clip_y - dst_region_y; - //dxx = dst_clip_x - dst_region_x; - - xp = xpoints;// + dxx; - yp = ypoints;// + dyy; - xapp = xapoints;// + dxx; - yapp = yapoints;// + dyy; - pbuf = buf; - - if (src->cache_entry.flags.alpha) - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - pix = *yp + *xp + pos; - - a = (A_VAL(pix) * xap) >> 10; - r = (R_VAL(pix) * xap) >> 10; - g = (G_VAL(pix) * xap) >> 10; - b = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - a += (A_VAL(pix) * Cx) >> 10; - r += (R_VAL(pix) * Cx) >> 10; - g += (G_VAL(pix) * Cx) >> 10; - b += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - a += (A_VAL(pix) * j) >> 10; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((yap = *yapp) > 0) - { - pix = *yp + *xp + src_w + pos; - aa = (A_VAL(pix) * xap) >> 10; - rr = (R_VAL(pix) * xap) >> 10; - gg = (G_VAL(pix) * xap) >> 10; - bb = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - aa += (A_VAL(pix) * Cx) >> 10; - rr += (R_VAL(pix) * Cx) >> 10; - gg += (G_VAL(pix) * Cx) >> 10; - bb += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - aa += (A_VAL(pix) * j) >> 10; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - a += ((aa - a) * yap) >> 8; - r += ((rr - r) * yap) >> 8; - g += ((gg - g) * yap) >> 8; - b += ((bb - b) * yap) >> 8; - } - *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - else - { -#ifdef DIRECT_SCALE - if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) - { - while (dst_clip_h--) - { - pbuf = dptr; -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - pix = *yp + *xp + pos; - - r = (R_VAL(pix) * xap) >> 10; - g = (G_VAL(pix) * xap) >> 10; - b = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - r += (R_VAL(pix) * Cx) >> 10; - g += (G_VAL(pix) * Cx) >> 10; - b += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((yap = *yapp) > 0) - { - pix = *yp + *xp + src_w + pos; - rr = (R_VAL(pix) * xap) >> 10; - gg = (G_VAL(pix) * xap) >> 10; - bb = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - rr += (R_VAL(pix) * Cx) >> 10; - gg += (G_VAL(pix) * Cx) >> 10; - bb += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - r += ((rr - r) * yap) >> 8; - g += ((gg - g) * yap) >> 8; - b += ((bb - b) * yap) >> 8; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - } -#ifdef EVAS_SLI - ysli++; -#endif - - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - else -#endif - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - pix = *yp + *xp + pos; - - r = (R_VAL(pix) * xap) >> 10; - g = (G_VAL(pix) * xap) >> 10; - b = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - r += (R_VAL(pix) * Cx) >> 10; - g += (G_VAL(pix) * Cx) >> 10; - b += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((yap = *yapp) > 0) - { - pix = *yp + *xp + src_w + pos; - rr = (R_VAL(pix) * xap) >> 10; - gg = (G_VAL(pix) * xap) >> 10; - bb = (B_VAL(pix) * xap) >> 10; - for (j = (1 << 14) - xap; j > Cx; j -= Cx) - { - pix++; - rr += (R_VAL(pix) * Cx) >> 10; - gg += (G_VAL(pix) * Cx) >> 10; - bb += (B_VAL(pix) * Cx) >> 10; - } - if (j > 0) - { - pix++; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - r += ((rr - r) * yap) >> 8; - g += ((gg - g) * yap) >> 8; - b += ((bb - b) * yap) >> 8; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c deleted file mode 100644 index 73da3a0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c +++ /dev/null @@ -1,387 +0,0 @@ -{ - int Cx, Cy, i, j; - DATA32 *dptr, *sptr, *pix, *pbuf; - int a, r, g, b, rx, gx, bx, ax; - int xap, yap, pos; - //int dyy, dxx; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - DATA32 **yp; - int *xp; - int w = dst_clip_w; - - dptr = dst_ptr; - pos = (src_region_y * src_w) + src_region_x; - //dyy = dst_clip_y - dst_region_y; - //dxx = dst_clip_x - dst_region_x; - - xp = xpoints;// + dxx; - yp = ypoints;// + dyy; - xapp = xapoints;// + dxx; - yapp = yapoints;// + dyy; - pbuf = buf; -/*#ifndef SCALE_USING_MMX */ -/* for now there's no mmx down scaling - so C only */ -#if 1 - if (src->cache_entry.flags.alpha) - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - - sptr = *yp + *xp + pos; - pix = sptr; - sptr += src_w; - - ax = (A_VAL(pix) * xap) >> 9; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - ax += (A_VAL(pix) * Cx) >> 9; - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - ax += (A_VAL(pix) * i) >> 9; - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - a = (ax * yap) >> 14; - r = (rx * yap) >> 14; - g = (gx * yap) >> 14; - b = (bx * yap) >> 14; - - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix = sptr; - sptr += src_w; - ax = (A_VAL(pix) * xap) >> 9; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - ax += (A_VAL(pix) * Cx) >> 9; - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - ax += (A_VAL(pix) * i) >> 9; - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - a += (ax * Cy) >> 14; - r += (rx * Cy) >> 14; - g += (gx * Cy) >> 14; - b += (bx * Cy) >> 14; - } - if (j > 0) - { - pix = sptr; - sptr += src_w; - ax = (A_VAL(pix) * xap) >> 9; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - ax += (A_VAL(pix) * Cx) >> 9; - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - ax += (A_VAL(pix) * i) >> 9; - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - a += (ax * j) >> 14; - r += (rx * j) >> 14; - g += (gx * j) >> 14; - b += (bx * j) >> 14; - } - *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5), - ((r + (1 << 4)) >> 5), - ((g + (1 << 4)) >> 5), - ((b + (1 << 4)) >> 5)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - yp++; yapp++; - } - } - else - { -#ifdef DIRECT_SCALE - if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - pbuf = dptr; - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - - sptr = *yp + *xp + pos; - pix = sptr; - sptr += src_w; - - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r = (rx * yap) >> 14; - g = (gx * yap) >> 14; - b = (bx * yap) >> 14; - - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix = sptr; - sptr += src_w; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r += (rx * Cy) >> 14; - g += (gx * Cy) >> 14; - b += (bx * Cy) >> 14; - } - if (j > 0) - { - pix = sptr; - sptr += src_w; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r += (rx * j) >> 14; - g += (gx * j) >> 14; - b += (bx * j) >> 14; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 4)) >> 5), - ((g + (1 << 4)) >> 5), - ((b + (1 << 4)) >> 5)); - xp++; xapp++; - } - } -#ifdef EVAS_SLI - ysli++; -#endif - dptr += dst_w; dst_clip_w = w; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - yp++; yapp++; - } - } - else -#endif - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - while (dst_clip_w--) - { - Cx = *xapp >> 16; - xap = *xapp & 0xffff; - - sptr = *yp + *xp + pos; - pix = sptr; - sptr += src_w; - - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r = (rx * yap) >> 14; - g = (gx * yap) >> 14; - b = (bx * yap) >> 14; - - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix = sptr; - sptr += src_w; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r += (rx * Cy) >> 14; - g += (gx * Cy) >> 14; - b += (bx * Cy) >> 14; - } - if (j > 0) - { - pix = sptr; - sptr += src_w; - rx = (R_VAL(pix) * xap) >> 9; - gx = (G_VAL(pix) * xap) >> 9; - bx = (B_VAL(pix) * xap) >> 9; - pix++; - for (i = (1 << 14) - xap; i > Cx; i -= Cx) - { - rx += (R_VAL(pix) * Cx) >> 9; - gx += (G_VAL(pix) * Cx) >> 9; - bx += (B_VAL(pix) * Cx) >> 9; - pix++; - } - if (i > 0) - { - rx += (R_VAL(pix) * i) >> 9; - gx += (G_VAL(pix) * i) >> 9; - bx += (B_VAL(pix) * i) >> 9; - } - - r += (rx * j) >> 14; - g += (gx * j) >> 14; - b += (bx * j) >> 14; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 4)) >> 5), - ((g + (1 << 4)) >> 5), - ((b + (1 << 4)) >> 5)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - yp++; yapp++; - } - } - } -#else - /* MMX scaling down would go here */ -#endif -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c deleted file mode 100644 index 3b7585d..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c +++ /dev/null @@ -1,260 +0,0 @@ -{ - int Cy, j; - DATA32 *dptr, *pix, *pbuf, **yp; - int r, g, b, a, rr, gg, bb, aa; - int *xp, xap, yap, pos; - //int dyy, dxx; - int w = dst_clip_w; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - dptr = dst_ptr; - pos = (src_region_y * src_w) + src_region_x; - //dyy = dst_clip_y - dst_region_y; - //dxx = dst_clip_x - dst_region_x; - - xp = xpoints;// + dxx; - yp = ypoints;// + dyy; - xapp = xapoints;// + dxx; - yapp = yapoints;// + dyy; - pbuf = buf; - - if (src->cache_entry.flags.alpha) - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - while (dst_clip_w--) - { - pix = *yp + *xp + pos; - - a = (A_VAL(pix) * yap) >> 10; - r = (R_VAL(pix) * yap) >> 10; - g = (G_VAL(pix) * yap) >> 10; - b = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - a += (A_VAL(pix) * Cy) >> 10; - r += (R_VAL(pix) * Cy) >> 10; - g += (G_VAL(pix) * Cy) >> 10; - b += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - a += (A_VAL(pix) * j) >> 10; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((xap = *xapp) > 0) - { - pix = *yp + *xp + 1 + pos; - aa = (A_VAL(pix) * yap) >> 10; - rr = (R_VAL(pix) * yap) >> 10; - gg = (G_VAL(pix) * yap) >> 10; - bb = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - aa += (A_VAL(pix) * Cy) >> 10; - rr += (R_VAL(pix) * Cy) >> 10; - gg += (G_VAL(pix) * Cy) >> 10; - bb += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - aa += (A_VAL(pix) * j) >> 10; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - a += ((aa - a) * xap) >> 8; - r += ((rr - r) * xap) >> 8; - g += ((gg - g) * xap) >> 8; - b += ((bb - b) * xap) >> 8; - } - *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - else - { -#ifdef DIRECT_SCALE - if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - pbuf = dptr; - while (dst_clip_w--) - { - pix = *yp + *xp + pos; - - r = (R_VAL(pix) * yap) >> 10; - g = (G_VAL(pix) * yap) >> 10; - b = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - r += (R_VAL(pix) * Cy) >> 10; - g += (G_VAL(pix) * Cy) >> 10; - b += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((xap = *xapp) > 0) - { - pix = *yp + *xp + 1 + pos; - rr = (R_VAL(pix) * yap) >> 10; - gg = (G_VAL(pix) * yap) >> 10; - bb = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - rr += (R_VAL(pix) * Cy) >> 10; - gg += (G_VAL(pix) * Cy) >> 10; - bb += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - r += ((rr - r) * xap) >> 8; - g += ((gg - g) * xap) >> 8; - b += ((bb - b) * xap) >> 8; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - } -#ifdef EVAS_SLI - ysli++; -#endif - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - else -#endif - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - Cy = *yapp >> 16; - yap = *yapp & 0xffff; - - while (dst_clip_w--) - { - pix = *yp + *xp + pos; - - r = (R_VAL(pix) * yap) >> 10; - g = (G_VAL(pix) * yap) >> 10; - b = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - r += (R_VAL(pix) * Cy) >> 10; - g += (G_VAL(pix) * Cy) >> 10; - b += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - r += (R_VAL(pix) * j) >> 10; - g += (G_VAL(pix) * j) >> 10; - b += (B_VAL(pix) * j) >> 10; - } - if ((xap = *xapp) > 0) - { - pix = *yp + *xp + 1 + pos; - rr = (R_VAL(pix) * yap) >> 10; - gg = (G_VAL(pix) * yap) >> 10; - bb = (B_VAL(pix) * yap) >> 10; - for (j = (1 << 14) - yap; j > Cy; j -= Cy) - { - pix += src_w; - rr += (R_VAL(pix) * Cy) >> 10; - gg += (G_VAL(pix) * Cy) >> 10; - bb += (B_VAL(pix) * Cy) >> 10; - } - if (j > 0) - { - pix += src_w; - rr += (R_VAL(pix) * j) >> 10; - gg += (G_VAL(pix) * j) >> 10; - bb += (B_VAL(pix) * j) >> 10; - } - r += ((rr - r) * xap) >> 8; - g += ((gg - g) * xap) >> 8; - b += ((bb - b) * xap) >> 8; - } - *pbuf++ = ARGB_JOIN(0xff, - ((r + (1 << 3)) >> 4), - ((g + (1 << 3)) >> 4), - ((b + (1 << 3)) >> 4)); - xp++; xapp++; - } - - func(buf, NULL, dc->mul.col, dptr, w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pbuf = buf; - dptr += dst_w; dst_clip_w = w; - yp++; yapp++; - xp = xpoints;// + dxx; - xapp = xapoints;// + dxx; - } - } - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c deleted file mode 100644 index 24529e5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c +++ /dev/null @@ -1,62 +0,0 @@ -{ - DATA32 *ptr; - RGBA_Gfx_Func func; - RGBA_Image *maskobj; - DATA8 *mask = NULL; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; - if (dc->mask.mask) - { - func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op); - maskobj = dc->mask.mask; - mask = maskobj->mask.mask; - } - 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); - else - func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); - - if (mask) - { - // mask += dst_clip_x - dc->mask.x; - // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w; - while (dst_clip_h--) - { - -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); - } -#ifdef EVAS_SLI - ysli++; -#endif - ptr += src_w; - dst_ptr += dst_w; - mask += maskobj->cache_entry.w; - } - } - else - { - while (dst_clip_h--) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w); - } -#ifdef EVAS_SLI - ysli++; -#endif - ptr += src_w; - dst_ptr += dst_w; - } - } -} - -/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c b/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c deleted file mode 100644 index 7327ac5..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c +++ /dev/null @@ -1,266 +0,0 @@ -{ - int srx = src_region_x, sry = src_region_y; - int srw = src_region_w, srh = src_region_h; - int drx = dst_region_x, dry = dst_region_y; - int drw = dst_region_w, drh = dst_region_h; - - int dsxx, dsyy, sxx, syy, sx, sy; - int cx, cy; - int direct_scale = 0, buf_step = 0; - - DATA32 *psrc, *pdst, *pdst_end; - DATA32 *buf, *pbuf, *pbuf_end; - RGBA_Gfx_Func func = NULL; - - /* check value to make overflow(only check value related with overflow) */ - if ((src_region_w > SCALE_SIZE_MAX) || - (src_region_h > SCALE_SIZE_MAX)) return; - - /* a scanline buffer */ - pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y) - pdst_end = pdst + (dst_clip_h * dst_w); - if (!dc->mul.use) - { - if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha) - { direct_scale = 1; buf_step = dst->cache_entry.w; } - else if (dc->render_op == _EVAS_RENDER_COPY) - { - direct_scale = 1; buf_step = dst->cache_entry.w; - if (src->cache_entry.flags.alpha) - dst->cache_entry.flags.alpha = 1; - } - } - if (!direct_scale) - { - buf = alloca(dst_clip_w * sizeof(DATA32)); - 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); - else - func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); - } - else - buf = pdst; - - if ((srw > 1) && (drw > 1)) - dsxx = ((srw - 1) << 16) / (drw - 1); - else - dsxx = (srw << 16) / drw; - if ((srh > 1) && (drh > 1)) - dsyy = ((srh - 1) << 16) / (drh - 1); - else - dsyy = (srh << 16) / drh; - - cx = dst_clip_x - drx; - cy = dst_clip_y - dry; - - sxx = (dsxx * cx); - syy = (dsyy * cy); - - sy = syy >> 16; - - if (drh == srh) - { - int sxx0 = sxx; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - psrc = src->image.data + (src_w * (sry + cy)) + srx; - while (pdst < pdst_end) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - pbuf = buf; pbuf_end = buf + dst_clip_w; - sxx = sxx0; -#ifdef SCALE_USING_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) -#endif - while (pbuf < pbuf_end) - { - DATA32 p0, p1; - int ax; - - sx = (sxx >> 16); - ax = 1 + ((sxx - (sx << 16)) >> 8); - p0 = p1 = *(psrc + sx); - if ((sx + 1) < srw) - p1 = *(psrc + sx + 1); -#ifdef SCALE_USING_MMX - MOV_P2R(p0, mm1, mm0) - if (p0 | p1) - { - MOV_A2R(ax, mm3) - MOV_P2R(p1, mm2, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - } - MOV_R2P(mm1, *pbuf, mm0) - pbuf++; -#else - if (p0 | p1) - p0 = INTERP_256(ax, p1, p0); - *pbuf++ = p0; -#endif - sxx += dsxx; - } - /* * blend here [clip_w *] buf -> dptr * */ - if (!direct_scale) - func(buf, NULL, dc->mul.col, pdst, dst_clip_w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pdst += dst_w; - psrc += src_w; - buf += buf_step; - } - - goto done_scale_up; - } - else if (drw == srw) - { - DATA32 *ps = src->image.data + (src_w * sry) + srx + cx; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - while (pdst < pdst_end) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - int ay; - - sy = syy >> 16; - psrc = ps + (sy * src_w); - ay = 1 + ((syy - (sy << 16)) >> 8); -#ifdef SCALE_USING_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_A2R(ay, mm4) -#endif - pbuf = buf; pbuf_end = buf + dst_clip_w; - while (pbuf < pbuf_end) - { - DATA32 p0 = *psrc, p2 = p0; - - if ((sy + 1) < srh) - p2 = *(psrc + src_w); -#ifdef SCALE_USING_MMX - MOV_P2R(p0, mm1, mm0) - if (p0 | p2) - { - MOV_P2R(p2, mm2, mm0) - INTERP_256_R2R(mm4, mm2, mm1, mm5) - } - MOV_R2P(mm1, *pbuf, mm0) - pbuf++; -#else - if (p0 | p2) - p0 = INTERP_256(ay, p2, p0); - *pbuf++ = p0; -#endif - psrc++; - } - /* * blend here [clip_w *] buf -> dptr * */ - if (!direct_scale) - func(buf, NULL, dc->mul.col, pdst, dst_clip_w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pdst += dst_w; - syy += dsyy; - buf += buf_step; - } - goto done_scale_up; - } - - { - DATA32 *ps = src->image.data + (src_w * sry) + srx; - int sxx0 = sxx; -#ifdef EVAS_SLI - int ysli = dst_clip_y; -#endif - - while (pdst < pdst_end) - { -#ifdef EVAS_SLI - if (((ysli) % dc->sli.h) == dc->sli.y) -#endif - { - int ay; - - sy = syy >> 16; - psrc = ps + (sy * src_w); - ay = 1 + ((syy - (sy << 16)) >> 8); -#ifdef SCALE_USING_MMX - MOV_A2R(ay, mm4) - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) -#endif - pbuf = buf; pbuf_end = buf + dst_clip_w; - sxx = sxx0; - while (pbuf < pbuf_end) - { - int ax; - DATA32 *p, *q; - DATA32 p0, p1, p2, p3; - - sx = sxx >> 16; - ax = 1 + ((sxx - (sx << 16)) >> 8); - p = psrc + sx; q = p + src_w; - p0 = p1 = p2 = p3 = *p; - if ((sx + 1) < srw) - p1 = *(p + 1); - if ((sy + 1) < srh) - { - p2 = *q; p3 = p2; - if ((sx + 1) < srw) - p3 = *(q + 1); - } -#ifdef SCALE_USING_MMX - MOV_A2R(ax, mm6) - MOV_P2R(p0, mm1, mm0) - if (p0 | p1) - { - MOV_P2R(p1, mm2, mm0) - INTERP_256_R2R(mm6, mm2, mm1, mm5) - } - MOV_P2R(p2, mm2, mm0) - if (p2 | p3) - { - MOV_P2R(p3, mm3, mm0) - INTERP_256_R2R(mm6, mm3, mm2, mm5) - } - INTERP_256_R2R(mm4, mm2, mm1, mm5) - MOV_R2P(mm1, *pbuf, mm0) - pbuf++; -#else - if (p0 | p1) - p0 = INTERP_256(ax, p1, p0); - if (p2 | p3) - p2 = INTERP_256(ax, p3, p2); - if (p0 | p2) - p0 = INTERP_256(ay, p2, p0); - *pbuf++ = p0; -#endif - sxx += dsxx; - } - /* * blend here [clip_w *] buf -> dptr * */ - if (!direct_scale) - func(buf, NULL, dc->mul.col, pdst, dst_clip_w); - } -#ifdef EVAS_SLI - ysli++; -#endif - pdst += dst_w; - syy += dsyy; - buf += buf_step; - } - } - done_scale_up: - return; -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.c b/libraries/evas/src/lib/engines/common/evas_scale_span.c deleted file mode 100644 index e0fefb2..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_span.c +++ /dev/null @@ -1,653 +0,0 @@ -#include "evas_common.h" -#include "evas_convert_color.h" -#include "evas_scale_span.h" - -static void -evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int mul = 0, step = 1; - DATA32 *pdst = dst; - - if (!src || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (mul_col != 0xffffffff) - mul = 1; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - - if ((src_len == 1) || (dst_len == 1)) - { - DATA32 c = *src; - - if (mul) c = MUL4_SYM(mul_col, c); - while (dst_len--) - *dst++ = c; - return; - } - - if (src_len == dst_len) - { - if (mul) - { -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(mul_col, mm7, mm0) -#endif - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_P2R(*src, mm1, mm0) - MUL4_SYM_R2R(mm7, mm1, mm5) - MOV_R2P(mm1, *pdst, mm0) -#else - *pdst = MUL4_SYM(mul_col, *src); -#endif - src++; pdst += step; - } - return; - } - while (dst_len--) - { - *pdst = *src; - src++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - if (mul) - { - MOV_P2R(mul_col, mm7, mm0) - } -#endif - while (dst_len--) - { - DATA32 p2, p1 = 0; - int a; - - sx = (sxx >> 16); - if (sx < src_len) - p1 = *(src + sx); - p2 = p1; - if ((sx + 1) < src_len) - p2 = *(src + sx + 1); - a = 1 + ((sxx - (sx << 16)) >> 8); -#ifdef BUILD_MMX - MOV_A2R(a, mm3) - MOV_P2R(p1, mm1, mm0) - MOV_P2R(p2, mm2, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - if (mul) - { - MUL4_SYM_R2R(mm7, mm1, mm5) - } - MOV_R2P(mm1, *pdst, mm0) -#else - p1 = INTERP_256(a, p2, p1); - if (mul) - p1 = MUL4_SYM(mul_col, p1); - *pdst = p1; -#endif - pdst += step; sxx += dsxx; - } - return; - } -} - -static void -evas_common_scale_rgba_a8_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int mul = 0, step = 1; - DATA32 *pdst = dst; - - if (!src || !mask || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (mul_col != 0xffffffff) - mul = 1; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - - if ((src_len == 1) || (dst_len == 1)) - { - DATA32 c = MUL_SYM(*mask, *src); - - if (mul) c = MUL4_SYM(mul_col, c); - while (dst_len--) - *dst++ = c; - return; - } - - if (src_len == dst_len) - { -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) -#endif - if (mul) - { -#ifdef BUILD_MMX - MOV_P2R(mul_col, mm7, mm0) -#endif - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_P2R(*src, mm1, mm0) - MOV_A2R(*mask, mm3) - MUL4_SYM_R2R(mm3, mm1, mm5) - MUL4_SYM_R2R(mm7, mm1, mm5) - MOV_R2P(mm1, *pdst, mm0) -#else - DATA32 c = MUL_SYM(*mask, *src); - *pdst = MUL4_SYM(mul_col, c); -#endif - src++; mask++; pdst += step; - } - return; - } - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_P2R(*src, mm1, mm0) - MOV_A2R(*mask, mm3) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *pdst, mm0) -#else - *pdst = MUL_SYM(*mask, *src); -#endif - src++; mask++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - if (mul) - { - MOV_P2R(mul_col, mm7, mm0) - } -#endif - while (dst_len--) - { - DATA32 p2, p1 = 0; - int a, a2, a1 = 0; - - sx = (sxx >> 16); - if (sx < src_len) - { - p1 = *(src + sx); - a1 = *(mask + sx); - } - p2 = p1; a2 = a1; - if ((sx + 1) < src_len) - { - p2 = *(src + sx + 1); - a2 = *(mask + sx + 1); - } - a = 1 + ((sxx - (sx << 16)) >> 8); -#ifdef BUILD_MMX - MOV_A2R(a, mm3) - MOV_P2R(p1, mm1, mm0) - MOV_P2R(p2, mm2, mm0) - INTERP_256_R2R(mm3, mm2, mm1, mm5) - a1 += 1 + ((a * (a2 - a1)) >> 8); - MOV_A2R(a1, mm3) - MUL4_256_R2R(mm3, mm1) - if (mul) - { - MUL4_SYM_R2R(mm7, mm1, mm5) - } - MOV_R2P(mm1, *pdst, mm0) -#else - p1 = INTERP_256(a, p2, p1); - a1 += 1 + ((a * (a2 - a1)) >> 8); - p1 = MUL_256(a1, p1); - if (mul) - p1 = MUL4_SYM(mul_col, p1); - *pdst = p1; -#endif - pdst += step; sxx += dsxx; - } - return; - } -} - -static void -evas_common_scale_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int step = 1; - DATA32 *pdst = dst; - - if (!mask || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - - if ((src_len == 1) || (dst_len == 1)) - { - DATA32 c = MUL_SYM(*mask, mul_col); - - while (dst_len--) - *dst++ = c; - return; - } - -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - MOV_P2R(mul_col, mm7, mm0) -#endif - if (src_len == dst_len) - { - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_A2R(*mask, mm3) - MUL4_SYM_R2R(mm7, mm3, mm5) - MOV_R2P(mm3, *pdst, mm0) -#else - *pdst = MUL_SYM(*mask, mul_col); -#endif - mask++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - - while (dst_len--) - { - int a, a2, a1 = 0; - - sx = (sxx >> 16); - if (sx < src_len) - a1 = *(mask + sx); - a2 = a1; - if ((sx + 1) < src_len) - a2 = *(mask + sx + 1); - a = 1 + ((sxx - (sx << 16)) >> 8); - a1 += 1 + ((a * (a2 - a1)) >> 8); -#ifdef BUILD_MMX - MOV_A2R(a1, mm3) - MUL4_256_R2R(mm7, mm3) - MOV_R2P(mm3, *pdst, mm0) -#else - *pdst = MUL_256(a1, mul_col); -#endif - pdst += step; sxx += dsxx; - } - return; - } -} - -static void -evas_common_scale_clip_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int mul = 0, step = 1; - DATA32 *pdst = dst; - - if (!mask || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (mul_col != 0xffffffff) - mul = 1; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - -#ifdef BUILD_MMX - pxor_r2r(mm0, mm0); - MOV_A2R(ALPHA_255, mm5) - if (mul) - { - MOV_P2R(mul_col, mm7, mm0) - } -#endif - if ((src_len == 1) || (dst_len == 1)) - { -#ifdef BUILD_MMX - MOV_A2R(*mask, mm3) -#else - DATA32 c = *mask; -#endif - if (mul) - { -#ifdef BUILD_MMX - MUL4_SYM_R2R(mm7, mm3, mm5) -#else - c = MUL_SYM(c, mul_col); -#endif - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_P2R(*dst, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *dst, mm0) -#else - *dst = MUL4_SYM(c, *dst); -#endif - dst++; - } - return; - } - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_P2R(*dst, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *dst, mm0) -#else - *dst = MUL_SYM(c, *dst); -#endif - dst++; - } - return; - } - - if (src_len == dst_len) - { - if (mul) - { - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_A2R(*mask, mm3) - MUL4_SYM_R2R(mm7, mm3, mm5) - MOV_P2R(*pdst, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *pdst, mm0) -#else - DATA32 c = MUL_SYM(*mask, mul_col); - - *pdst = MUL4_SYM(c, *pdst); -#endif - mask++; pdst += step; - } - return; - } - while (dst_len--) - { -#ifdef BUILD_MMX - MOV_A2R(*mask, mm3) - MOV_P2R(*pdst, mm1, mm0) - MUL4_SYM_R2R(mm3, mm1, mm5) - MOV_R2P(mm1, *pdst, mm0) -#else - *pdst = MUL_SYM(*mask, *pdst); -#endif - mask++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - - while (dst_len--) - { - int a, a2, a1 = 0; - - sx = (sxx >> 16); - if (sx < src_len) - a1 = *(mask + sx); - a2 = a1; - if ((sx + 1) < src_len) - a2 = *(mask + sx + 1); - a = 1 + ((sxx - (sx << 16)) >> 8); - a1 += 1 + ((a * (a2 - a1)) >> 8); -#ifdef BUILD_MMX - MOV_A2R(a1, mm3) - MOV_P2R(*pdst, mm1, mm0) - MUL4_256_R2R(mm3, mm1) - if (mul) - { - MUL4_SYM_R2R(mm7, mm1, mm5) - } - MOV_R2P(mm1, *pdst, mm0) -#else - *pdst = MUL_256(a1, *pdst); - if (mul) - *pdst = MUL4_SYM(mul_col, *pdst); -#endif - pdst += step; sxx += dsxx; - } - return; - } -} - -EAPI void -evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir); - evas_common_cpu_end_opt(); -} - -EAPI void -evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); - evas_common_cpu_end_opt(); -} - -EAPI void -evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); - evas_common_cpu_end_opt(); -} - -EAPI void -evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); - evas_common_cpu_end_opt(); -} - -EAPI void -evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int mul = 0, step = 1; - DATA32 *pdst = dst; - - if (!src || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (mul_col != 0xffffffff) - mul = 1; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - - if ((src_len == 1) || (dst_len == 1)) - { - DATA32 c = *src; - - if (mul) c = MUL4_SYM(mul_col, c); - while (dst_len--) - *dst++ = c; - return; - } - - if (src_len == dst_len) - { - if (mul) - { - while (dst_len--) - { - *pdst = MUL4_SYM(mul_col, *src); - src++; pdst += step; - } - return; - } - while (dst_len--) - { - *pdst = *src; - src++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - - while (dst_len--) - { - DATA32 p2, p1 = 0; - int a, h1, s1, v1, h2, s2, v2; - - sx = (sxx >> 16); - if (sx < src_len) - p1 = *(src + sx); - evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, - &h1, &s1, &v1); - p2 = p1; - if ((sx + 1) < src_len) - p2 = *(src + sx + 1); - evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, - &h2, &s2, &v2); - a = 1 + ((sxx - (sx << 16)) >> 8); - h1 += (a * (h2 - h1)) >> 8; - s1 += (a * (s2 - s1)) >> 8; - v1 += (a * (v2 - v1)) >> 8; - a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + - (p1 & 0xff000000)) & 0xff000000; - evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); - p1 = a + RGB_JOIN(h2,s2,v2); - if (mul) - p1 = MUL4_SYM(mul_col, p1); - *pdst = p1; - pdst += step; sxx += dsxx; - } - return; - } -} - -EAPI void -evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) -{ - int mul = 0, step = 1; - DATA32 *pdst = dst; - - if (!src || !mask || !dst) return; - if ((src_len < 1) || (dst_len < 1)) return; - if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; - if (mul_col != 0xffffffff) - mul = 1; - if (dir < 0) - { - pdst += dst_len - 1; - step = -1; - } - - if ((src_len == 1) || (dst_len == 1)) - { - DATA32 c = MUL_SYM(*mask, *src); - - if (mul) c = MUL4_SYM(mul_col, c); - while (dst_len--) - *dst++ = c; - return; - } - - if (src_len == dst_len) - { - if (mul) - { - while (dst_len--) - { - DATA32 c = MUL_SYM(*mask, *src); - *pdst = MUL4_SYM(mul_col, c); - src++; mask++; pdst += step; - } - return; - } - while (dst_len--) - { - *pdst = MUL_SYM(*mask, *src); - src++; mask++; pdst += step; - } - return; - } - - { - DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); - DATA32 sxx = 0; - int sx = sxx >> 16; - - while (dst_len--) - { - DATA32 p2, p1 = 0; - int a, a2, a1 = 0; - int h1, s1, v1, h2, s2, v2; - - sx = (sxx >> 16); - if (sx < src_len) - { - p1 = *(src + sx); - a1 = *(mask + sx); - } - p2 = p1; a2 = a1; - if ((sx + 1) < src_len) - { - p2 = *(src + sx + 1); - a2 = *(mask + sx + 1); - } - evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, - &h1, &s1, &v1); - evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, - &h2, &s2, &v2); - a = 1 + ((sxx - (sx << 16)) >> 8); - a1 += (a * (a2 - a1)) >> 8; - h1 += (a * (h2 - h1)) >> 8; - s1 += (a * (s2 - s1)) >> 8; - v1 += (a * (v2 - v1)) >> 8; - a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + - (p1 & 0xff000000)) & 0xff000000; - - evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); - p1 = a + RGB_JOIN(h2,s2,v2); - p1 = MUL_SYM(a1, p1); - if (mul) - p1 = MUL4_SYM(mul_col, p1); - *pdst = p1; - pdst += step; sxx += dsxx; - } - return; - } -} diff --git a/libraries/evas/src/lib/engines/common/evas_scale_span.h b/libraries/evas/src/lib/engines/common/evas_scale_span.h deleted file mode 100644 index 874c594..0000000 --- a/libraries/evas/src/lib/engines/common/evas_scale_span.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _EVAS_SCALE_SPAN_H -#define _EVAS_SCALE_SPAN_H - - -EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); -EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); -EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); -EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); - -EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); -EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); - - -#endif /* _EVAS_SCALE_SPAN_H */ diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.c b/libraries/evas/src/lib/engines/common/evas_text_utils.c deleted file mode 100644 index a00df91..0000000 --- a/libraries/evas/src/lib/engines/common/evas_text_utils.c +++ /dev/null @@ -1,472 +0,0 @@ -#include "evas_common.h" -#include "evas_font_private.h" -#include "evas_text_utils.h" -#include "language/evas_bidi_utils.h" -#include "language/evas_language_utils.h" -#include "evas_font_ot.h" - -void -evas_common_text_props_bidi_set(Evas_Text_Props *props, - Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start) -{ -#ifdef BIDI_SUPPORT - props->bidi.dir = (evas_bidi_is_rtl_char( - bidi_par_props, - 0, - start)) ? EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; -#else - (void) start; - (void) bidi_par_props; - props->bidi.dir = EVAS_BIDI_DIRECTION_LTR; -#endif -} - -void -evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr) -{ - props->script = scr; -} - -void -evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst, - const Evas_Text_Props *src) -{ - memcpy(dst, src, sizeof(Evas_Text_Props)); - evas_common_text_props_content_ref(dst); -} - -void -evas_common_text_props_content_ref(Evas_Text_Props *props) -{ - /* No content in this case */ - if (!props->info) - return; - - props->info->refcount++; -} - -void -evas_common_text_props_content_unref(Evas_Text_Props *props) -{ - /* No content in this case */ - if (!props->info) - return; - - if (--(props->info->refcount) == 0) - { - if (props->info->glyph) - free(props->info->glyph); -#ifdef OT_SUPPORT - if (props->info->ot) - free(props->info->ot); -#endif - free(props->info); - props->info = NULL; - } -} - -static int -_evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos, - Eina_Bool right) -{ - int prop_pos = evas_common_text_props_index_find(props, pos); - if (!right && (prop_pos > 0)) - { -#ifdef OT_SUPPORT - return props->info->ot[props->start + prop_pos - 1].source_cluster - - props->text_offset; -#else - return props->start + prop_pos - 1 - props->text_offset; -#endif - } - else if (right && (prop_pos < (int) (props->len - 1))) - { -#ifdef OT_SUPPORT - return props->info->ot[props->start + prop_pos + 1].source_cluster - - props->text_offset; -#else - return props->start + prop_pos + 1 - props->text_offset; -#endif - } - - return pos; -} - -EAPI int -evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos) -{ - Eina_Bool right; - /* Move right if we are in a non-rtl text */ - right = (props->bidi.dir != EVAS_BIDI_DIRECTION_RTL); - return _evas_common_text_props_cluster_move(props, pos, right); -} - -EAPI int -evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos) -{ - Eina_Bool right; - /* Move right if we are in an rtl text */ - right = (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL); - return _evas_common_text_props_cluster_move(props, pos, right); -} - -/* Returns the index of the logical char in the props. */ -EAPI int -evas_common_text_props_index_find(const 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; - /* Should get us closer to the right place. */ - if ((min <= _cutoff) && (_cutoff <= max)) - mid = _cutoff; - else - mid = (min + max) / 2; - - if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - /* Monotonic in a descending order */ - do - { - 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; - - mid = (min + max) / 2; - } - while (min <= max); - } - else - { - /* Monotonic in an ascending order */ - do - { - 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; - - mid = (min + max) / 2; - } - 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--; - } - 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) -{ - size_t cutoff; - - /* Translate text cutoff pos to string object cutoff point */ -#ifdef OT_SUPPORT - _cutoff = evas_common_text_props_index_find(base, _cutoff); - - if (_cutoff >= 0) - { - cutoff = (size_t) _cutoff; - } - else - { - ERR("Couldn't find the cutoff position. Is it inside a cluster?"); - return; - } -#else - cutoff = (size_t) _cutoff; -#endif - - evas_common_text_props_content_copy_and_ref(ext, base); - if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - ext->start = base->start; - ext->len = cutoff + 1; - base->start = base->start + ext->len; - base->len = base->len - ext->len; - -#ifdef OT_SUPPORT - ext->text_offset = - ext->info->ot[ext->start + ext->len - 1].source_cluster; -#else - ext->text_offset = base->text_offset + base->len; -#endif - } - else - { - ext->start = base->start + cutoff; - ext->len = base->len - cutoff; - base->len = cutoff; - -#ifdef OT_SUPPORT - ext->text_offset = ext->info->ot[ext->start].source_cluster; -#else - ext->text_offset = base->text_offset + base->len; -#endif - } - ext->text_len = base->text_len - (ext->text_offset - base->text_offset); - base->text_len = (ext->text_offset - base->text_offset); -} - -/* Won't work in the middle of ligatures */ -EAPI void -evas_common_text_props_merge(Evas_Text_Props *item1, - const Evas_Text_Props *item2) -{ - if (item1->info != item2->info) - { - ERR("tried merge back items that weren't together in the first place."); - return; - } - if (item1->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - item1->start = item2->start; - } - - item1->len += item2->len; - item1->text_len += item2->text_len; -} - -EAPI Eina_Bool -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_Int *fi = (RGBA_Font_Int *) _fi; - - if (text_props->info) - { - evas_common_text_props_content_unref(text_props); - } - if (len == 0) - { - text_props->info = NULL; - text_props->start = text_props->len = text_props->text_offset = 0; - } - text_props->info = calloc(1, sizeof(Evas_Text_Props_Info)); - - text_props->font_instance = 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; - } - -#ifdef OT_SUPPORT - size_t char_index; - Evas_Font_Glyph_Info *gl_itr; - Evas_Coord pen_x = 0, adjust_x = 0; - (void) par_props; - (void) par_pos; - - 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 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_get_char_index(fi, REPLACEMENT_CHAR); - is_replacement = EINA_TRUE; - } - idx = gl_itr->index; - LKL(fi->ft_mutex); - fg = evas_common_font_int_cache_glyph_get(fi, idx); - if (!fg) - { - LKU(fi->ft_mutex); - continue; - } - LKU(fi->ft_mutex); - - gl_itr->x_bear = fg->glyph_out->left; - gl_itr->width = fg->glyph_out->bitmap.width; - /* text_props->info->glyph[char_index].advance = - * text_props->info->glyph[char_index].index = - * 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; - /* 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 - /* We are walking the string in visual ordering */ - Evas_Font_Glyph_Info *gl_itr; - 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(); - prev_index = 0; - - i = len; - text_props->info->glyph = calloc(len, - sizeof(Evas_Font_Glyph_Info)); - - if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) - { - text += len - 1; - adv_d = -1; - } - else - { - adv_d = 1; - } - - gl_itr = text_props->info->glyph; - for ( ; i > 0 ; gl_itr++, text += adv_d, i--) - { - FT_UInt idx; - RGBA_Font_Glyph *fg; - int _gl, kern; - Evas_Coord adv; - _gl = *text; - if (_gl == 0) break; - - idx = evas_common_get_char_index(fi, _gl); - if (idx == 0) - { - idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR); - } - - LKL(fi->ft_mutex); - fg = evas_common_font_int_cache_glyph_get(fi, idx); - if (!fg) - { - LKU(fi->ft_mutex); - continue; - } - kern = 0; - - if ((use_kerning) && (prev_index) && (idx) && - (pface == fi->src->ft.face)) - { - if (evas_common_font_query_kerning(fi, prev_index, idx, &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); - - gl_itr->index = idx; - gl_itr->x_bear = fg->glyph_out->left; - adv = fg->glyph->advance.x >> 10; - gl_itr->width = fg->glyph_out->bitmap.width; - - 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; -} diff --git a/libraries/evas/src/lib/engines/common/evas_text_utils.h b/libraries/evas/src/lib/engines/common/evas_text_utils.h deleted file mode 100644 index 7f1c802..0000000 --- a/libraries/evas/src/lib/engines/common/evas_text_utils.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef _EVAS_TEXT_UTILS_H -# define _EVAS_TEXT_UTILS_H - -typedef struct _Evas_Text_Props Evas_Text_Props; -typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info; -typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info; - -# include "evas_font_ot.h" -# 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 - * glyphs_info and ot_data fields, they are both internal */ - size_t start; - size_t len; - size_t text_offset; /* The text offset from the start of the info */ - size_t text_len; /* The length of the original text */ - Evas_BiDi_Props bidi; - Evas_Script_Type script; - Evas_Text_Props_Info *info; - void *font_instance; -}; - -struct _Evas_Text_Props_Info -{ - unsigned int refcount; - Evas_Font_Glyph_Info *glyph; - Evas_Font_OT_Info *ot; -}; - -/* Sorted in visual order when created */ -struct _Evas_Font_Glyph_Info -{ - unsigned int index; /* Should conform to FT */ - Evas_Coord x_bear; -#if 0 - /* This one is rarely used, only in draw, in which we already get the glyph - * so it doesn't really save time. Leaving it here just so no one will - * add it thinking it was accidentally skipped */ - Evas_Coord y_bear; -#endif - Evas_Coord width; - Evas_Coord pen_after; -}; - - -void -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, Evas_Script_Type scr); - -EAPI Eina_Bool -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, - const Evas_Text_Props *src); - -void -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_cluster_next(const Evas_Text_Props *props, int pos); - -EAPI int -evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos); - -EAPI int -evas_common_text_props_index_find(const 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 diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c deleted file mode 100644 index bc5e99c..0000000 --- a/libraries/evas/src/lib/engines/common/evas_tiler.c +++ /dev/null @@ -1,1439 +0,0 @@ -#include "evas_common.h" -#ifdef EVAS_RECT_SPLIT - -static inline void rect_list_node_pool_set_max(int max); -static inline void rect_list_node_pool_flush(void); -static inline list_node_t *rect_list_node_pool_get(void); -static inline void rect_list_node_pool_put(list_node_t *node); -static inline void rect_init(rect_t *r, int x, int y, int w, int h); -static inline void rect_list_append_node(list_t *rects, list_node_t *node); -static inline void rect_list_append(list_t *rects, const rect_t r); -static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h); -static inline void rect_list_concat(list_t *rects, list_t *other); -static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node); -static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node); -static inline void rect_list_clear(list_t *rects); -static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r); -static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node); -static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error); -static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); -static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); -static inline void rect_print(const rect_t r); -#if 0 -static inline void rect_list_print(const list_t rects); -#endif - -static const list_node_t list_node_zeroed = { NULL }; -static const list_t list_zeroed = { NULL, NULL }; - -typedef struct list_node_pool -{ - list_node_t *node; - int len; - int max; -} list_node_pool_t; - -static list_node_pool_t list_node_pool = { NULL, 0, 1024 }; - -static inline void -rect_list_node_pool_set_max(int max) -{ - int diff; - - diff = list_node_pool.len - max; - for (; diff > 0 && list_node_pool.node; diff--) - { - list_node_t *node; - - node = list_node_pool.node; - list_node_pool.node = node->next; - list_node_pool.len--; - - free(node); - } - - list_node_pool.max = max; -} - -static inline void -rect_list_node_pool_flush(void) -{ - while (list_node_pool.node) - { - list_node_t *node; - - node = list_node_pool.node; - list_node_pool.node = node->next; - list_node_pool.len--; - - free(node); - } -} - -static inline list_node_t * -rect_list_node_pool_get(void) -{ - if (list_node_pool.node) - { - list_node_t *node; - - node = list_node_pool.node; - list_node_pool.node = node->next; - list_node_pool.len--; - - return node; - } - else return malloc(sizeof(rect_node_t)); -} - -static inline void -rect_list_node_pool_put(list_node_t *node) -{ - if (list_node_pool.len < list_node_pool.max) - { - node->next = list_node_pool.node; - list_node_pool.node = node; - list_node_pool.len++; - } - else free(node); -} - -static inline void -rect_init(rect_t *r, int x, int y, int w, int h) -{ - r->area = w * h; - - r->left = x; - r->top = y; - - r->right = x + w; - r->bottom = y + h; - - r->width = w; - r->height = h; -} - -static inline void -rect_print(const rect_t r) -{ - INF("", r.left, r.top, r.width, r.height); -} - -#if 0 -static inline void -rect_list_print(const list_t rects) -{ - list_node_t *node; - int len; - - len = 0; - for (node = rects.head; node; node = node->next) len++; - - putchar('['); - for (node = rects.head; node; node = node->next) - { - rect_print(((rect_node_t *)node)->rect); - if (node->next) - { - putchar(','); - if (len < 4) putchar(' '); - else - { - putchar('\n'); - putchar(' '); - } - } - } - putchar(']'); -} -#endif - -static inline void -rect_list_append_node(list_t *rects, list_node_t *node) -{ - if (rects->tail) - { - rects->tail->next = node; - rects->tail = node; - } - else - { - rects->head = node; - rects->tail = node; - } -} - -static inline void -rect_list_append(list_t *rects, const rect_t r) -{ - rect_node_t *rect_node; - - rect_node = (rect_node_t *)rect_list_node_pool_get(); - rect_node->rect = r; - rect_node->_lst = list_node_zeroed; - - rect_list_append_node(rects, (list_node_t *)rect_node); -} - -static inline void -rect_list_append_xywh(list_t *rects, int x, int y, int w, int h) -{ - rect_t r; - - rect_init(&r, x, y, w, h); - rect_list_append(rects, r); -} - -static inline void -rect_list_concat(list_t *rects, list_t *other) -{ - if (!other->head) - return; - - if (rects->tail) - { - rects->tail->next = other->head; - rects->tail = other->tail; - } - else - { - rects->head = other->head; - rects->tail = other->tail; - } - *other = list_zeroed; -} - -static inline list_node_t * -rect_list_unlink_next(list_t *rects, list_node_t *parent_node) -{ - list_node_t *node; - - if (parent_node) - { - node = parent_node->next; - parent_node->next = node->next; - } - else - { - node = rects->head; - rects->head = node->next; - } - - if (rects->tail == node) rects->tail = parent_node; - *node = list_node_zeroed; - return node; -} - -static inline void -rect_list_del_next(list_t *rects, list_node_t *parent_node) -{ - list_node_t *node; - - node = rect_list_unlink_next(rects, parent_node); - rect_list_node_pool_put(node); -} - -static inline void -rect_list_clear(list_t *rects) -{ - list_node_t *node; - - node = rects->head; - while (node) - { - list_node_t *aux; - - aux = node->next; - rect_list_node_pool_put(node); - node = aux; - } - *rects = list_zeroed; -} - -static inline void -_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height) -{ - int max_left, min_right, max_top, min_bottom; - - if (a.left < b.left) max_left = b.left; - else max_left = a.left; - - if (a.right < b.right) min_right = a.right; - else min_right = b.right; - - *width = min_right - max_left; - - if (a.top < b.top) max_top = b.top; - else max_top = a.top; - - if (a.bottom < b.bottom) min_bottom = a.bottom; - else min_bottom = b.bottom; - - *height = min_bottom - max_top; -} - -static inline void -_split_strict(list_t *dirty, const rect_t current, rect_t r) -{ - int h_1, h_2, w_1, w_2; - - h_1 = current.top - r.top; - h_2 = r.bottom - current.bottom; - w_1 = current.left - r.left; - w_2 = r.right - current.right; - - if (h_1 > 0) - { - /* .--.r (b) .---.r2 - * | | | | - * .-------.cur (a) .---.r '---' - * | | | | -> | | + - * | `--' | `---' - * `-------' - */ - rect_list_append_xywh(dirty, r.left, r.top, r.width, h_1); - r.height -= h_1; - r.top = current.top; - } - - if (h_2 > 0) - { - /* .-------.cur (a) - * | .---. | .---.r - * | | | | -> | | - * `-------' `---' + .---.r2 - * | | | | - * `---'r (b) `---' - */ - rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2); - r.height -= h_2; - } - - if (w_1 > 0) - { - /* (b) r .----.cur (a) - * .--|-. | .--.r2 .-.r - * | | | | -> | | + | | - * `--|-' | `--' `-' - * `----' - */ - rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); - /* not necessary to keep these, r (b) will be destroyed */ - /* r.width -= w_1; */ - /* r.left = current.left; */ - } - - if (w_2 > 0) - { - /* .----.cur (a) - * | | - * | .-|--.r (b) .-.r .--.r2 - * | | | | -> | | + | | - * | `-|--' `-' `--' - * `----' - */ - rect_list_append_xywh(dirty, current.right, r.top, w_2, r.height); - /* not necessary to keep this, r (b) will be destroyed */ - /* r.width -= w_2; */ - } -} - -static inline void -rect_list_del_split_strict(list_t *rects, const rect_t del_r) -{ - list_t modified = list_zeroed; - list_node_t *cur_node, *prev_node; - - prev_node = NULL; - cur_node = rects->head; - while (cur_node) - { - int intra_width, intra_height; - rect_t current; - - current = ((rect_node_t*)cur_node)->rect; - - _calc_intra_rect_area(del_r, current, &intra_width, &intra_height); - if ((intra_width <= 0) || (intra_height <= 0)) - { - /* .---.current .---.del_r - * | | | | - * `---+---.del_r `---+---.current - * | | | | - * `---' `---' - * no interception, nothing to do - */ - prev_node = cur_node; - cur_node = cur_node->next; - } - else if ((intra_width == current.width) && - (intra_height == current.height)) - { - /* .-------.del_r - * | .---. | - * | | | | - * | `---'current - * `-------' - * current is contained, remove from rects - */ - cur_node = cur_node->next; - rect_list_del_next(rects, prev_node); - } - else - { - _split_strict(&modified, del_r, current); - cur_node = cur_node->next; - rect_list_del_next(rects, prev_node); - } - } - - rect_list_concat(rects, &modified); -} - -static inline void -rect_list_add_split_strict(list_t *rects, list_node_t *node) -{ - list_t dirty = list_zeroed; - list_t new_dirty = list_zeroed; - list_node_t *cur_node; - - if (!rects->head) - { - rect_list_append_node(rects, node); - return; - } - - rect_list_append_node(&dirty, node); - - cur_node = rects->head; - while (dirty.head) - { - rect_t current; - - if (!cur_node) - { - rect_list_concat(rects, &dirty); - break; - } - - current = ((rect_node_t*)cur_node)->rect; - - while (dirty.head) - { - int intra_width, intra_height; - rect_t r; - - r = ((rect_node_t *)dirty.head)->rect; - _calc_intra_rect_area(r, current, &intra_width, &intra_height); - if ((intra_width == r.width) && (intra_height == r.height)) - /* .-------.cur - * | .---.r| - * | | | | - * | `---' | - * `-------' - */ - rect_list_del_next(&dirty, NULL); - else if ((intra_width <= 0) || (intra_height <= 0)) - { - /* .---.cur .---.r - * | | | | - * `---+---.r `---+---.cur - * | | | | - * `---' `---' - */ - list_node_t *tmp; - tmp = rect_list_unlink_next(&dirty, NULL); - rect_list_append_node(&new_dirty, tmp); - } - else - { - _split_strict(&new_dirty, current, r); - rect_list_del_next(&dirty, NULL); - } - } - dirty = new_dirty; - new_dirty = list_zeroed; - - cur_node = cur_node->next; - } -} - -static inline void -_calc_intra_outer_rect_area(const rect_t a, const rect_t b, - rect_t *intra, rect_t *outer) -{ - int min_left, max_left, min_right, max_right; - int min_top, max_top, min_bottom, max_bottom; - - if (a.left < b.left) - { - max_left = b.left; - min_left = a.left; - } - else - { - max_left = a.left; - min_left = b.left; - } - - if (a.right < b.right) - { - min_right = a.right; - max_right = b.right; - } - else - { - min_right = b.right; - max_right = a.right; - } - - intra->left = max_left; - intra->right = min_right; - intra->width = min_right - max_left; - - outer->left = min_left; - outer->right = max_right; - outer->width = max_right - min_left; - - if (a.top < b.top) - { - max_top = b.top; - min_top = a.top; - } - else - { - max_top = a.top; - min_top = b.top; - } - - if (a.bottom < b.bottom) - { - min_bottom = a.bottom; - max_bottom = b.bottom; - } - else - { - min_bottom = b.bottom; - max_bottom = a.bottom; - } - - intra->top = max_top; - intra->bottom = min_bottom; - intra->height = min_bottom - max_top; - if ((intra->width > 0) && (intra->height > 0)) - intra->area = intra->width * intra->height; - else - intra->area = 0; - - outer->top = min_top; - outer->bottom = max_bottom; - outer->height = max_bottom - min_top; - outer->area = outer->width * outer->height; -} - -enum -{ - SPLIT_FUZZY_ACTION_NONE, - SPLIT_FUZZY_ACTION_SPLIT, - SPLIT_FUZZY_ACTION_MERGE -}; - -static inline int -_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b) -{ - int h_1, h_2, w_1, w_2, action; - - h_1 = a.top - b->top; - h_2 = b->bottom - a.bottom; - w_1 = a.left - b->left; - w_2 = b->right - a.right; - - action = SPLIT_FUZZY_ACTION_NONE; - - if (h_1 > 0) - { - /* .--.r (b) .---.r2 - * | | | | - * .-------.cur (a) .---.r '---' - * | | | | -> | | + - * | `--' | `---' - * `-------' - */ - rect_list_append_xywh(dirty, b->left, b->top, b->width, h_1); - b->height -= h_1; - b->top = a.top; - action = SPLIT_FUZZY_ACTION_SPLIT; - } - - if (h_2 > 0) - { - /* .-------.cur (a) - * | .---. | .---.r - * | | | | -> | | - * `-------' `---' + .---.r2 - * | | | | - * `---'r (b) `---' - */ - rect_list_append_xywh(dirty, b->left, a.bottom, b->width, h_2); - b->height -= h_2; - action = SPLIT_FUZZY_ACTION_SPLIT; - } - - if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height)) - return SPLIT_FUZZY_ACTION_MERGE; - - if (w_1 > 0) - { - /* (b) r .----.cur (a) - * .--|-. | .--.r2 .-.r - * | | | | -> | | + | | - * `--|-' | `--' `-' - * `----' - */ - rect_list_append_xywh(dirty, b->left, b->top, w_1, b->height); - /* not necessary to keep these, r (b) will be destroyed */ - /* b->width -= w_1; */ - /* b->left = a.left; */ - action = SPLIT_FUZZY_ACTION_SPLIT; - } - - if (w_2 > 0) - { - /* .----.cur (a) - * | | - * | .-|--.r (b) .-.r .--.r2 - * | | | | -> | | + | | - * | `-|--' `-' `--' - * `----' - */ - rect_list_append_xywh(dirty, a.right, b->top, w_2, b->height); - /* not necessary to keep these, r (b) will be destroyed */ - /* b->width -= w_2; */ - action = SPLIT_FUZZY_ACTION_SPLIT; - } - - return action; -} - -static inline list_node_t * -rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error) -{ - list_t dirty = list_zeroed; - list_node_t *old_last; - - old_last = rects->tail; - - if (!rects->head) - { - rect_list_append_node(rects, node); - return old_last; - } - - rect_list_append_node(&dirty, node); - while (dirty.head) - { - list_node_t *d_node, *cur_node, *prev_cur_node; - int keep_dirty; - rect_t r; - - d_node = rect_list_unlink_next(&dirty, NULL); - r = ((rect_node_t *)d_node)->rect; - - prev_cur_node = NULL; - cur_node = rects->head; - keep_dirty = 1; - while (cur_node) - { - int area, action; - rect_t current, intra, outer; - - current = ((rect_node_t *)cur_node)->rect; - - _calc_intra_outer_rect_area(r, current, &intra, &outer); - area = current.area + r.area - intra.area; - - if ((intra.width == r.width) && (intra.height == r.height)) - { - /* .-------.cur - * | .---.r| - * | | | | - * | `---' | - * `-------' - */ - keep_dirty = 0; - break; - } - else if ((intra.width == current.width) && - (intra.height == current.height)) - { - /* .-------.r - * | .---.cur - * | | | | - * | `---' | - * `-------' - */ - if (old_last == cur_node) - old_last = prev_cur_node; - cur_node = cur_node->next; - rect_list_del_next(rects, prev_cur_node); - } - else if ((outer.area - area) <= accepted_error) - { - /* .-----------. bounding box (outer) - * |.---. .---.| - * ||cur| |r || - * || | | || - * |`---' `---'| - * `-----------' - * merge them, remove both and add merged - */ - rect_node_t *n; - - if (old_last == cur_node) - old_last = prev_cur_node; - - n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node); - n->rect = outer; - rect_list_append_node(&dirty, (list_node_t *)n); - - keep_dirty = 0; - break; - } - else if (intra.area <= accepted_error) - { - /* .---.cur .---.r - * | | | | - * `---+---.r `---+---.cur - * | | | | - * `---' `---' - * no split, no merge - */ - prev_cur_node = cur_node; - cur_node = cur_node->next; - } - else - { - /* split is required */ - action = _split_fuzzy(&dirty, current, &r); - if (action == SPLIT_FUZZY_ACTION_MERGE) - { - /* horizontal merge is possible: remove both, add merged */ - rect_node_t *n; - - if (old_last == cur_node) - old_last = prev_cur_node; - - n = (rect_node_t *) - rect_list_unlink_next(rects, prev_cur_node); - - n->rect.left = outer.left; - n->rect.width = outer.width; - n->rect.right = outer.right; - n->rect.area = outer.width * r.height; - rect_list_append_node(&dirty, (list_node_t *)n); - } - else if (action == SPLIT_FUZZY_ACTION_NONE) - { - /* - * this rect check was totally useless, - * should never happen - */ - /* prev_cur_node = cur_node; */ - /* cur_node = cur_node->next; */ - WRN("Should not get here!"); - abort(); - } - - keep_dirty = 0; - break; - } - } - - if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node); - else rect_list_node_pool_put(d_node); - } - - return old_last; -} - -static inline void -_calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer) -{ - int min_left, max_right; - int min_top, max_bottom; - - if (a.left < b.left) min_left = a.left; - else min_left = b.left; - - if (a.right < b.right) max_right = b.right; - else max_right = a.right; - - outer->left = min_left; - outer->right = max_right; - outer->width = max_right - min_left; - - if (a.top < b.top) min_top = a.top; - else min_top = b.top; - - if (a.bottom < b.bottom) max_bottom = b.bottom; - else max_bottom = a.bottom; - - outer->top = min_top; - outer->bottom = max_bottom; - outer->height = max_bottom - min_top; - - outer->area = outer->width * outer->height; -} - -static inline void -rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error) -{ - while (to_merge->head) - { - list_node_t *node, *parent_node; - rect_t r1; - int merged; - - r1 = ((rect_node_t *)to_merge->head)->rect; - - merged = 0; - parent_node = NULL; - node = rects->head; - while (node) - { - rect_t r2, outer; - int area; - - r2 = ((rect_node_t *)node)->rect; - - _calc_outer_rect_area(r1, r2, &outer); - area = r1.area + r2.area; /* intra area is taken as 0 */ - if (outer.area - area <= accepted_error) - { - /* - * remove both r1 and r2, create r3 - * actually r3 uses r2 instance, saves memory - */ - rect_node_t *n; - - n = (rect_node_t *)rect_list_unlink_next(rects, parent_node); - n->rect = outer; - rect_list_append_node(to_merge, (list_node_t *)n); - merged = 1; - break; - } - - parent_node = node; - node = node->next; - } - - if (!merged) - { - list_node_t *n; - n = rect_list_unlink_next(to_merge, NULL); - rect_list_append_node(rects, n); - } - else - rect_list_del_next(to_merge, NULL); - } -} - -static inline void -rect_list_add_split_fuzzy_and_merge(list_t *rects, - list_node_t *node, - int split_accepted_error, - int merge_accepted_error) -{ - list_node_t *n; - - n = rect_list_add_split_fuzzy(rects, node, split_accepted_error); - if (n && n->next) - { - list_t to_merge; - - /* split list into 2 segments, already merged and to merge */ - to_merge.head = n->next; - to_merge.tail = rects->tail; - rects->tail = n; - n->next = NULL; - - rect_list_merge_rects(rects, &to_merge, merge_accepted_error); - } -} -#endif /* EVAS_RECT_SPLIT */ - -#define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)]) - -#ifdef RECTUPDATE -#elif defined(EVAS_RECT_SPLIT) -#else -/* -static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); -static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill); -static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); - */ -#endif -/* -static void tilebuf_setup(Tilebuf *tb); - */ - -EAPI void -evas_common_tilebuf_init(void) -{ -} - -EAPI Tilebuf * -evas_common_tilebuf_new(int w, int h) -{ - Tilebuf *tb; - - tb = calloc(1, sizeof(Tilebuf)); - if (!tb) return NULL; - - tb->tile_size.w = 8; - tb->tile_size.h = 8; - tb->outbuf_w = w; - tb->outbuf_h = h; - - return tb; -} - -EAPI void -evas_common_tilebuf_free(Tilebuf *tb) -{ -#ifdef RECTUPDATE -/* - evas_common_regionbuf_free(tb->rb); - */ -#elif defined(EVAS_RECT_SPLIT) - rect_list_clear(&tb->rects); - rect_list_node_pool_flush(); -#else -/* - if (tb->tiles.tiles) free(tb->tiles.tiles); - */ -#endif - free(tb); -} - -EAPI void -evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th) -{ - tb->tile_size.w = tw; - tb->tile_size.h = th; -/* - tilebuf_setup(tb); - */ -} - -EAPI void -evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th) -{ - if (tw) *tw = tb->tile_size.w; - if (th) *th = tb->tile_size.h; -} - -#ifdef EVAS_RECT_SPLIT -static inline int -_add_redraw(list_t *rects, int x, int y, int w, int h) -{ - rect_node_t *rn; -/* we dont need to do this fuzz stuff - it actually creates overdraw bugs - * when evas shouldnt draw at all. - x >>= 1; - y >>= 1; - w += 2; - w >>= 1; - h += 2; - h >>= 1; - */ - rn = (rect_node_t *)rect_list_node_pool_get(); - rn->_lst = list_node_zeroed; - rect_init(&rn->rect, x, y, w, h); - //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h); - //testing on my core2 duo desktop - fuzz of 32 or 48 is best. -#define FUZZ 32 - rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, - FUZZ * FUZZ, FUZZ * FUZZ); - return 1; -} -#endif - -EAPI int -evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h) -{ -#ifdef RECTUPDATE -/* - int i; - - if ((w <= 0) || (h <= 0)) return 0; - RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); - if ((w <= 0) || (h <= 0)) return 0; - for (i = 0; i < h; i++) - evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i); - return 1; - */ -#elif defined(EVAS_RECT_SPLIT) - if ((w <= 0) || (h <= 0)) return 0; - RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); - if ((w <= 0) || (h <= 0)) return 0; - // optimize a common case -> adding the exact same rect 2x in a row - if ((tb->prev_add.x == x) && (tb->prev_add.y == y) && - (tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1; - tb->prev_add.x = x; tb->prev_add.y = y; - tb->prev_add.w = w; tb->prev_add.h = h; - tb->prev_del.w = 0; tb->prev_del.h = 0; - return _add_redraw(&tb->rects, x, y, w, h); -#else -/* - int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; - int num; - - if ((w <= 0) || (h <= 0)) return 0; - RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); - if ((w <= 0) || (h <= 0)) return 0; - num = 0; - // wipes out any motion vectors in tiles it touches into redraws - if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && - tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) - { - Tilebuf_Tile *tbt; - int delta_x; - int delta_y; - - tbt = &(TILE(tb, tx1, ty1)); - delta_x = tx2 - tx1 + 1; - delta_y = ty2 - ty1 + 1; - for (yy = delta_y; yy > 0; yy--) - { - Tilebuf_Tile *tbti; - - tbti = tbt; - for (xx = delta_x; xx > 0; xx--) - { - tbti->redraw = 1; - tbti++; - } - tbt += tb->tiles.w; - } - num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); - } - return num; - */ -#endif -} - -EAPI int -evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h) -{ -#ifdef RECTUPDATE -/* - int i; - - for (i = 0; i < h; i++) - evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i); - */ -#elif defined(EVAS_RECT_SPLIT) - rect_t r; - - if (!tb->rects.head) return 0; - if ((w <= 0) || (h <= 0)) return 0; - RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); - if ((w <= 0) || (h <= 0)) return 0; - -/* we dont need to do this fuzz stuff - it actually creates overdraw bugs - * when evas shouldnt draw at all. - x += 1; - y += 1; - x >>= 1; - y >>= 1; - w -= 1; - w >>= 1; - h -= 1; - h >>= 1; - - if ((w <= 0) || (h <= 0)) return 0; - */ - - // optimize a common case -> deleting the exact same rect 2x in a row - if ((tb->prev_del.x == x) && (tb->prev_del.y == y) && - (tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1; - tb->prev_del.x = x; tb->prev_del.y = y; - tb->prev_del.w = w; tb->prev_del.h = h; - tb->prev_add.w = 0; tb->prev_add.h = 0; - rect_init(&r, x, y, w, h); - - rect_list_del_split_strict(&tb->rects, r); - tb->need_merge = 1; - return 0; -#else -/* - int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; - int num; - - num = 0; - // wipes out any motion vectors in tiles it touches into redraws - if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && - tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) - { - Tilebuf_Tile *tbt; - int delta_y; - int delta_x; - - if (!tfx1) tx1++; - if (!tfx2) tx2--; - if (!tfy1) ty1++; - if (!tfy2) ty2--; - - tbt = &(TILE(tb, tx1, ty1)); - delta_x = tx2 - tx1 + 1; - delta_y = ty2 - ty1 + 1; - for (yy = delta_y; yy > 0; yy--) - { - Tilebuf_Tile *tbti; - - tbti = tbt; - for (xx = delta_x; xx > 0; xx--) - { - tbti->redraw = 0; - tbti++; - } - tbt += tb->tiles.w; - } - num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); - } - return num; - */ -#endif -} - -EAPI int -evas_common_tilebuf_add_motion_vector(Tilebuf *tb __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dx __UNUSED__, int dy __UNUSED__, int alpha __UNUSED__) -{ -#ifdef EVAS_RECT_SPLIT -/* motion vector handling never has been used -> disable it - list_t lr = list_zeroed; - int num; - - num = _add_redraw(&lr, x, y, w, h); - num += _add_redraw(&lr, x + dx, y + dy, w, h); - while (lr.head) - { - list_node_t *node = rect_list_unlink_next(&lr, NULL); - rect_list_add_split_fuzzy_and_merge(&tb->rects, node, - FUZZ * FUZZ, FUZZ * FUZZ); - } - return num; - */ - return 0; -#else -/* - int num; - - num = evas_common_tilebuf_add_redraw(tb, x, y, w, h); - num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h); - return num; - */ -#endif -} - -EAPI void -evas_common_tilebuf_clear(Tilebuf *tb) -{ -#ifdef RECTUPDATE -/* - evas_common_regionbuf_clear(tb->rb); - */ -#elif defined(EVAS_RECT_SPLIT) - tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0; - tb->prev_del.x = tb->prev_del.y = tb->prev_del.w = tb->prev_del.h = 0; - rect_list_clear(&tb->rects); - tb->need_merge = 0; -#else -/* - if (!tb->tiles.tiles) return; - memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); - */ -#endif -} - -EAPI Tilebuf_Rect * -evas_common_tilebuf_get_render_rects(Tilebuf *tb) -{ -#ifdef RECTUPDATE -/* - return evas_common_regionbuf_rects_get(tb->rb); - */ -#elif defined(EVAS_RECT_SPLIT) - list_node_t *n; - Tilebuf_Rect *rects = NULL; - int bx1 = 0, bx2 = 0, by1 = 0, by2 = 0, num = 0; - - if (tb->need_merge) - { - list_t to_merge; - to_merge = tb->rects; - tb->rects = list_zeroed; - rect_list_merge_rects(&tb->rects, &to_merge, FUZZ * FUZZ); - tb->need_merge = 0; - } - - n = tb->rects.head; - if (n) - { - bx1 = ((rect_node_t *)n)->rect.left; - bx2 = bx1 + ((rect_node_t *)n)->rect.width; - by1 = ((rect_node_t *)n)->rect.top; - by2 = by1 + ((rect_node_t *)n)->rect.height; - n = n->next; - for (; n; n = n->next) - { - - int x1, x2, y1, y2; - - x1 = ((rect_node_t *)n)->rect.left; - if (x1 < bx1) bx1 = x1; - x2 = x1 + ((rect_node_t *)n)->rect.width; - if (x2 > bx2) bx2 = x2; - - y1 = ((rect_node_t *)n)->rect.top; - if (y1 < by1) by1 = y1; - y2 = y1 + ((rect_node_t *)n)->rect.height; - if (y2 > by2) by2 = y2; - num++; - } - } -#define MAXREG 24 - /* magic number - but if we have > MAXREG regions to update, take bounding box */ - if (num > MAXREG) - { - Tilebuf_Rect *r; - - r = malloc(sizeof(Tilebuf_Rect)); - r->x = bx1; - r->y = by1; - r->w = bx2 - bx1; - r->h = by2 - by1; - - rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); - return rects; - } - - for (n = tb->rects.head; n; n = n->next) - { - rect_t cur; - - cur = ((rect_node_t *)n)->rect; -/* disable fuzz - created bugs. - cur.left <<= 1; - cur.top <<= 1; - cur.width <<= 1; - cur.height <<= 1; - */ - RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height, - 0, 0, tb->outbuf_w, tb->outbuf_h); - if ((cur.width > 0) && (cur.height > 0)) - { - Tilebuf_Rect *r; - - r = malloc(sizeof(Tilebuf_Rect)); - r->x = cur.left; - r->y = cur.top; - r->w = cur.width; - r->h = cur.height; - - rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); - } - } - return rects; - -#else -/* - Tilebuf_Rect *rects = NULL; - Tilebuf_Tile *tbt; - int x, y; - - tbt = &(TILE(tb, 0, 0)); - for (y = 0; y < tb->tiles.h; y++) - { - for (x = 0; x < tb->tiles.w; x++, tbt++) - { - if (tbt->redraw) - { - Tilebuf_Tile *tbti; - int can_expand_x = 1, can_expand_y = 1; - Tilebuf_Rect *r = NULL; - int xx = 0, yy = 0; - r = malloc(sizeof(Tilebuf_Rect)); - r->_list_data.next = NULL; - r->_list_data.prev = NULL; - r->_list_data.last = NULL; - - // amalgamate tiles -#if 1 - tbti = tbt; - while (can_expand_x) - { - tbti++; - xx++; - if ((x + xx) >= tb->tiles.w) - can_expand_x = 0; - else if (!(tbti->redraw)) - can_expand_x = 0; - if (can_expand_x) - tbti->redraw = 0; - } - tbti = tbt; - while (can_expand_y) - { - int i; - - tbti += tb->tiles.w; - yy++; - if ((y + yy) >= tb->tiles.h) - can_expand_y = 0; - if (can_expand_y) - { - Tilebuf_Tile *tbtj; - - tbtj = tbti; - for (i = x; i < x + xx; i++, tbtj++) - { - if (!(tbtj->redraw)) - { - can_expand_y = 0; - break; - } - } - } - if (can_expand_y) - { - Tilebuf_Tile *tbtj; - - tbtj = tbti; - for (i = x; i < x + xx; i++, tbtj++) - tbtj->redraw = 0; - } - } - tbt->redraw = 0; -#else - xx = 1; - yy = 1; -#endif - r->x = x * tb->tile_size.w; - r->y = y * tb->tile_size.h; - r->w = (xx) * tb->tile_size.w; - r->h = (yy) * tb->tile_size.h; - rects = eina_inlist_append(rects, r); - x = x + (xx - 1); - tbt += xx - 1; - } - } - } - return rects; - */ -#endif -} - -EAPI void -evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects) -{ - while (rects) - { - Tilebuf_Rect *r; - - r = rects; - rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); - free(r); - } -} - -/* need a way of getting rectangles to: blit, re-render */ - - - - - -/* internal usage */ -/* -static void -tilebuf_setup(Tilebuf *tb) -{ - if ((tb->outbuf_w <= 0) || (tb->outbuf_h <= 0)) return; -#ifdef RECTUPDATE - tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h); -#elif defined(EVAS_RECT_SPLIT) - tb->rects = list_zeroed; -#else - if (tb->tiles.tiles) free(tb->tiles.tiles); - tb->tiles.tiles = NULL; - - tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w; - tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h; - - tb->tiles.tiles = malloc(tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); - - if (!tb->tiles.tiles) - { - tb->tiles.w = 0; - tb->tiles.h = 0; - return; - } - memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); -#endif -} -*/ - -#ifdef RECTUPDATE -#elif defined(EVAS_RECT_SPLIT) -#else -/* -static int -tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) -{ - return tilebuf_intersect(tb->tile_size.w, tb->outbuf_w, tb->tiles.w, - x, w, x1, x2, x1_fill, x2_fill); -} - -static int -tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill) -{ - return tilebuf_intersect(tb->tile_size.h, tb->outbuf_h, tb->tiles.h, - y, h, y1, y2, y1_fill, y2_fill); -} - -static int -tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) -{ - int p1, p2; - - // initial clip out of region - if ((x + w) <= 0) return 0; - if (x >= tlen) return 0; - - // adjust x & w so it all fits in region - if (x < 0) - { - w += x; - x = 0; - } - if (w < 0) return 0; - if ((x + w) > tlen) w = tlen - x; - - // now figure if the first edge is fully filling its tile - p1 = (x) / tsize; - if ((p1 * tsize) == (x)) *x1_fill = 1; - else *x1_fill = 0; - *x1 = p1; - - // now figure if the last edge is fully filling its tile - p2 = (x + w - 1) / tsize; - if (((p2 + 1) * tsize) == (x + w)) *x2_fill = 1; - else *x2_fill = 0; - *x2 = p2; - - return 1; - tnum = 0; -} -*/ -#endif diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c deleted file mode 100644 index 002cfbe..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c +++ /dev/null @@ -1,645 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -#include "evas_common.h" -#include "evas_bidi_utils.h" - -#include "evas_font_private.h" - -#ifdef BIDI_SUPPORT -#include -/** - * @internal - * @addtogroup Evas_Utils - * - * @{ - */ -/** - * @internal - * @addtogroup Evas_BiDi - * - * @{ - */ - -/** - * @internal - * @def _SAFE_FREE(x) - * checks if x is not NULL, if it's not, it's freed and set to NULL. - */ -#define _SAFE_FREE(x) \ - do { \ - if (x) \ - { \ - free(x); \ - x = NULL; \ - } \ - } 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) -{ - Eina_Unicode *ret = dest; - - while (*src) - *dest++ = *src++; - *dest = 0; - return ret; -} - -/* Convert eina_unicode to bidi_char assume both are valid pointers */ -static FriBidiChar * -_evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src) -{ - FriBidiChar *ret = dest; - - while (*src) - *dest++ = *src++; - *dest = 0; - return ret; -} -#endif - -/** - * @internal - * Checks if the string has RTL characters. - * - * @param str The string to be checked - * @return #EINA_TRUE if true, #EINA_FALSE otherwise. - */ -Eina_Bool -evas_bidi_is_rtl_str(const Eina_Unicode *str) -{ - EvasBiDiCharType type; - - if (!str) - return EINA_FALSE; - - for ( ; *str ; str++) - { - type = fribidi_get_bidi_type((FriBidiChar) *str); - if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type)) - { - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -/** - * @internal - * Shapes the string ustr according to the bidi properties. - * - * @param str The string to shape - * @param bidi_props the bidi props to shaped according. - * @param start the start of the string to shape (offset in bidi_props) - * @param len the length of th string. - * @return #EINA_TRUE on success, #EINA_FALSE otherwise. - */ -EAPI Eina_Bool -evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len) -{ - FriBidiChar *ustr, *base_ustr = NULL; - - if (!bidi_props) - return EINA_FALSE; - - /* The size of fribidichar is different than eina_unicode, convert */ -#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; - join_types = (EvasBiDiJoiningType *) malloc(sizeof(EvasBiDiJoiningType) * len); - if (!join_types) - { - return EINA_FALSE; - } - fribidi_get_joining_types(ustr, len, join_types); - - fribidi_join_arabic(bidi_props->char_types + start, len, - bidi_props->embedding_levels + start, join_types); - - - /* Actually modify the string */ - fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC, - bidi_props->embedding_levels + start, len, join_types, ustr); - - if (join_types) free(join_types); - - /* Convert back */ -#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++) - { - 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; - } - } - } - 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; -} - -/** - * @internal - * 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, 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; - - if (!eina_ustr) - return NULL; - - - if (!evas_bidi_is_rtl_str(eina_ustr)) /* No need to handle bidi */ - { - len = -1; - goto cleanup; - } - - len = eina_unicode_strlen(eina_ustr); - /* The size of fribidichar s different than eina_unicode, convert */ -#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(); - - /* Prep work for reordering */ - char_types = (EvasBiDiCharType *) malloc(sizeof(EvasBiDiCharType) * len); - if (!char_types) - { - len = -2; - goto cleanup; - } - fribidi_get_bidi_types(ustr, len, char_types); - - embedding_levels = (EvasBiDiLevel *)malloc(sizeof(EvasBiDiLevel) * len); - if (!embedding_levels) - { - len = -2; - goto cleanup; - } - - if (segment_idxs) - { - 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; - } - } - - - /* clean up */ - if (bidi_props->embedding_levels) - { - free(bidi_props->embedding_levels); - } - bidi_props->embedding_levels = embedding_levels; - - /* clean up */ - - if (bidi_props->char_types) - { - free(bidi_props->char_types); - } - bidi_props->char_types = char_types; - - if (base_ustr) free(base_ustr); - - - return bidi_props; - -/* Cleanup */ -cleanup: - if (char_types) free(char_types); - if (embedding_levels) free(embedding_levels); - if (base_ustr) free(base_ustr); - if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */ - return NULL; -} - -/** - * @internal - * Copies dst to src and refs (doesn't copy) the paragraph props. - * - * @param src the props to copy - * @param dst the props to copy to. - */ -void -evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst) -{ - dst->dir = src->dir; -} - -/** - * @internal - * Reorders ustr according to the bidi props. - * - * @param ustr the string to reorder. - Null is ok, will just populate the map. - * @param start the start of the line - * @param len the length of the line - * @param props the paragraph props to reorder according to - * @param _v_to_l The visual to logical map to populate - if NULL it won't populate it. - * @return #EINA_FALSE on success, #EINA_TRUE on error. - */ -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) -{ - EvasBiDiStrIndex *v_to_l = NULL; - FriBidiChar *ustr = NULL, *base_ustr = NULL; - - if (!props) - return EINA_FALSE; - - if (eina_ustr) - { - /* The size of fribidichar is different than eina_unicode, convert */ -#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 - } - - - if (_v_to_l) { - size_t i; - v_to_l = *_v_to_l = calloc(len, sizeof(EvasBiDiStrIndex)); - if (!v_to_l) - { - goto error; - } - /* init the array for fribidi */ - for (i = 0 ; i < len ; i++) - { - v_to_l[i] = i; - } - } - - { - EvasBiDiLevel *emb_lvl; - emb_lvl = malloc((start + len) * sizeof(EvasBiDiLevel)); - memcpy(emb_lvl, props->embedding_levels, - (start + len) * sizeof(EvasBiDiLevel)); - /* We pass v_to_l - start, because fribidi assumes start is the offset - * from the start of v_to_l as well, not just the props. */ - if (!fribidi_reorder_line (FRIBIDI_FLAGS_DEFAULT, props->char_types, - len, start, props->direction, emb_lvl, ustr, v_to_l - start)) - { - free(emb_lvl); - goto error; - } - free(emb_lvl); - } - - - /* The size of fribidichar is different than eina_unicode, convert */ -#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: - if (base_ustr) free(base_ustr); - _SAFE_FREE(v_to_l); - return EINA_TRUE; -} - -/** - * @internal - * Returns the end of the current run of text - * - * @param bidi_props the paragraph properties - * @param start where to start looking from - * @param len the length of the string - * @return the position of the end of the run (offset from - * bidi_props->props->start), 0 when there is no end (i.e all the text) - */ -int -evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, - size_t start, int len) -{ - EvasBiDiLevel *i; - EvasBiDiLevel base; - - if (!bidi_props || (len <= 0)) - return 0; - - i = bidi_props->embedding_levels + start; - base = *i; - for ( ; (len > 0) && (base == *i) ; len--, i++) - ; - - if (len == 0) - { - return 0; - } - return i - (bidi_props->embedding_levels + start); -} - -/** - * @internal - * Returns the visual string index from the logical string index. - * - * @param v_to_l the visual to logical map - * @param len the length of the map. - * @param position the position to convert. - * @return on success the visual position, on failure the same position. - */ -EvasBiDiStrIndex -evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position) -{ - int i; - EvasBiDiStrIndex *ind; - if (position >= len || !v_to_l) - return position; - - for (i = 0, ind = v_to_l ; i < len ; i++, ind++) - { - if (*ind == position) - { - return i; - } - } - return position; -} - -/** - * @internal - * Returns the reversed pos of the index. - * - * @param dir the direction of the string - * @param len the length of the map. - * @param position the position to convert. - * @return on success the visual position, on failure the same position. - */ -EvasBiDiStrIndex -evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position) -{ - if (!props || position >= len) - return position; - - return (props->dir == EVAS_BIDI_DIRECTION_RTL) ? (len - 1) - position : position; -} - -/** - * @internal - * Checks if the char is rtl oriented. I.e even a neutral char can become rtl - * if surrounded by rtl chars. - * - * @param bidi_props The bidi paragraph properties - * @param start the base position - * @param index the offset from the base position. - * @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 ind) -{ - if(!bidi_props || ind < 0) - return EINA_FALSE; - return (FRIBIDI_IS_RTL( - bidi_props->embedding_levels[ind + start])) - ? EINA_TRUE : EINA_FALSE; -} - -Evas_BiDi_Paragraph_Props * -evas_bidi_paragraph_props_new(void) -{ - Evas_BiDi_Paragraph_Props *ret; - ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props)); - ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; - ret->refcount = 1; - - return ret; -} - -/** - * @internal - * Refs the bidi props. - * - * @param bidi_props the props to ref. - */ -Evas_BiDi_Paragraph_Props * -evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) -{ - if (!bidi_props) return NULL; - BIDILOCK(); - - bidi_props->refcount++; - BIDIUNLOCK(); - return bidi_props; -} - -/** - * @internal - * Unrefs and potentially frees the props. - * - * @param bidi_props the properties to unref - */ -void -evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) -{ - if (!bidi_props) return; - BIDILOCK(); - - if (--bidi_props->refcount == 0) - { - evas_bidi_paragraph_props_clean(bidi_props); - free(bidi_props); - } - BIDIUNLOCK(); -} - - -/** - * @internal - * Cleans the paragraph properties. - * - * @param bidi_props the properties to clean. - */ -void -evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) -{ - _SAFE_FREE(bidi_props->embedding_levels); - _SAFE_FREE(bidi_props->char_types); -} - -/** - * @internal - * Cleans the bidi properties. - * - * @param bidi_props the properties to clean. - */ -void -evas_bidi_props_clean(Evas_BiDi_Props *bidi_props) -{ - if (!bidi_props) return; - bidi_props->dir = EVAS_BIDI_DIRECTION_NEUTRAL; -} -/** - * @} - */ -/** - * @} - */ -#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 - diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h deleted file mode 100644 index f1a374b..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h +++ /dev/null @@ -1,157 +0,0 @@ -#ifndef _EVAS_BIDI_UTILS -#define _EVAS_BIDI_UTILS - -/** - * @internal - * @addtogroup Evas_Utils - * - * @{ - */ -/** - * @internal - * @defgroup Evas_BiDi Evas BiDi utility functions - * - * This set of functions and types helps evas handle BiDi strings correctly. - * @todo Document types, structures and macros. - * - * @{ - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#ifdef HAVE_FRIBIDI -# define USE_FRIBIDI -# define BIDI_SUPPORT -#endif - -#include - -#ifdef USE_FRIBIDI -# include -#endif - -/* abstract fribidi - we statically define sizes here because otherwise we would - * have to ifdef everywhere (because function decorations may change with/without - * bidi support) - * These types should only be passed as pointers! i.e do not directely use any of - * these types in function declarations. Defining as void should help ensuring that. - */ - -/* Evas_BiDi_Direction is defined in evas.h */ - -#ifdef USE_FRIBIDI -# define _EVAS_BIDI_TYPEDEF(type) \ - typedef FriBidi ## type EvasBiDi ## type -#else -# define _EVAS_BIDI_TYPEDEF(type) \ - typedef void EvasBiDi ## type -#endif - -#if 0 /* We are using Eina_Unicode instead */ -_EVAS_BIDI_TYPEDEF(Char); -#endif -_EVAS_BIDI_TYPEDEF(CharType); -_EVAS_BIDI_TYPEDEF(ParType); -_EVAS_BIDI_TYPEDEF(StrIndex); -_EVAS_BIDI_TYPEDEF(Level); -_EVAS_BIDI_TYPEDEF(JoiningType); - -typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props; -typedef struct _Evas_BiDi_Props Evas_BiDi_Props; - -/* This structure defines a set of properties of a BiDi string. In case of a - * non-bidi string, all values should be NULL. - * To check if a structure describes a bidi string or not, use the macro - * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM. - */ -struct _Evas_BiDi_Paragraph_Props { - EvasBiDiCharType *char_types; /* BiDi char types */ - EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */ - int refcount; /* The number of references to this object */ -#ifdef USE_FRIBIDI - EvasBiDiParType direction; -#endif -}; - -#include "Evas.h" -struct _Evas_BiDi_Props -{ - Evas_BiDi_Direction dir; -}; - - - -#ifdef USE_FRIBIDI - -#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 -#define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL - -#define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \ - (((x) && \ - ((x->direction == EVAS_BIDI_PARAGRAPH_RTL) || \ - (x->direction == EVAS_BIDI_PARAGRAPH_WRTL))) ? \ - EINA_TRUE : EINA_FALSE) - - -# define evas_bidi_position_visual_to_logical(list, position) \ - (list) ? list[position] : position; - -EvasBiDiStrIndex -evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position); - -EvasBiDiStrIndex -evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position); - -Eina_Bool -evas_bidi_is_rtl_str(const Eina_Unicode *str); - -Eina_Bool -evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index); - -int -evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); - -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, 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); - -EAPI Eina_Bool -evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len); - -void -evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1); - -void -evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); - -Evas_BiDi_Paragraph_Props * -evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); - -void -evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); - -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 -/** - * @} - */ -/** - * @} - */ - -#endif - diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c deleted file mode 100644 index b362f10..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @internal - * @addtogroup Evas_Utils - * - * @{ - */ -/** - * @internal - * @defgroup Evas_Script Evas Script (language) utility functions - * - * This set of functions and types helps evas handle scripts correctly. - * @todo Document types, structures and macros. - * - * @{ - */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include - -#include "evas_language_utils.h" -#include "evas_bidi_utils.h" /* Used for splitting according to bidi */ -#include "../evas_font_ot.h" /* Used for harfbuzz info */ - -#ifdef USE_HARFBUZZ -# include -#endif - -#include "evas_script_table.h" - -static Evas_Script_Type -_evas_common_language_char_script_search(Eina_Unicode unicode) -{ - 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) -{ - 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 -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 */ - Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN; - int i; - for (i = 0 ; i < len ; i++, str++) - { - Evas_Script_Type tmp; - tmp = evas_common_language_char_script_get(*str); - /* Arabic is the first script in the array that's not - * common/inherited. */ - if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC)) - { - first = tmp; - continue; - } - if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC)) - { - break; - } - } -#ifdef BIDI_SUPPORT - { - int bidi_end; - bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len); - if (bidi_end > 0) - { - i = (i < bidi_end) ? i : bidi_end; - } - } -#else - (void) bidi_props; - (void) start; -#endif - return (i < len) ? i : 0; -} - -Evas_Script_Type -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 < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++) - ; - return script; -} - -const char * -evas_common_language_from_locale_get(void) -{ - static char lang[6]; /* FIXME: Maximum length I know about */ - if (*lang) return lang; - - const char *locale; - locale = getenv("LANG"); - if (locale && *locale) - { - char *itr; - strncpy(lang, locale, 5); - lang[5] = '\0'; - itr = lang; - while (*itr) - { - if (*itr == '_') - { - *itr = '\0'; - } - itr++; - } - return lang; - } - - return ""; -} - -/* - * @} - */ -/* - * @} - */ - diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.h b/libraries/evas/src/lib/engines/common/language/evas_language_utils.h deleted file mode 100644 index fa795ec..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_language_utils.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef _EVAS_LANGUAGE_UTILS -#define _EVAS_LANGUAGE_UTILS - -#include -#include "evas_bidi_utils.h" - -/* Unicode Script property */ -typedef enum -{ - EVAS_SCRIPT_COMMON = 0, /* Zyyy */ - EVAS_SCRIPT_INHERITED, /* Qaai */ - EVAS_SCRIPT_ARABIC, /* Arab */ - EVAS_SCRIPT_ARMENIAN, /* Armn */ - EVAS_SCRIPT_BENGALI, /* Beng */ - EVAS_SCRIPT_BOPOMOFO, /* Bopo */ - EVAS_SCRIPT_CHEROKEE, /* Cher */ - EVAS_SCRIPT_COPTIC, /* Qaac */ - EVAS_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ - EVAS_SCRIPT_DESERET, /* Dsrt */ - EVAS_SCRIPT_DEVANAGARI, /* Deva */ - EVAS_SCRIPT_ETHIOPIC, /* Ethi */ - EVAS_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ - EVAS_SCRIPT_GOTHIC, /* Goth */ - EVAS_SCRIPT_GREEK, /* Grek */ - EVAS_SCRIPT_GUJARATI, /* Gujr */ - EVAS_SCRIPT_GURMUKHI, /* Guru */ - EVAS_SCRIPT_HAN, /* Hani */ - EVAS_SCRIPT_HANGUL, /* Hang */ - EVAS_SCRIPT_HEBREW, /* Hebr */ - EVAS_SCRIPT_HIRAGANA, /* Hira */ - EVAS_SCRIPT_KANNADA, /* Knda */ - EVAS_SCRIPT_KATAKANA, /* Kana */ - EVAS_SCRIPT_KHMER, /* Khmr */ - EVAS_SCRIPT_LAO, /* Laoo */ - EVAS_SCRIPT_LATIN, /* Latn (Latf, Latg) */ - EVAS_SCRIPT_MALAYALAM, /* Mlym */ - EVAS_SCRIPT_MONGOLIAN, /* Mong */ - EVAS_SCRIPT_MYANMAR, /* Mymr */ - EVAS_SCRIPT_OGHAM, /* Ogam */ - EVAS_SCRIPT_OLD_ITALIC, /* Ital */ - EVAS_SCRIPT_ORIYA, /* Orya */ - EVAS_SCRIPT_RUNIC, /* Runr */ - EVAS_SCRIPT_SINHALA, /* Sinh */ - EVAS_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ - EVAS_SCRIPT_TAMIL, /* Taml */ - EVAS_SCRIPT_TELUGU, /* Telu */ - EVAS_SCRIPT_THAANA, /* Thaa */ - EVAS_SCRIPT_THAI, /* Thai */ - EVAS_SCRIPT_TIBETAN, /* Tibt */ - EVAS_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ - EVAS_SCRIPT_YI, /* Yiii */ - EVAS_SCRIPT_TAGALOG, /* Tglg */ - EVAS_SCRIPT_HANUNOO, /* Hano */ - EVAS_SCRIPT_BUHID, /* Buhd */ - EVAS_SCRIPT_TAGBANWA, /* Tagb */ - - /* Unicode-4.0 additions */ - EVAS_SCRIPT_BRAILLE, /* Brai */ - EVAS_SCRIPT_CYPRIOT, /* Cprt */ - EVAS_SCRIPT_LIMBU, /* Limb */ - EVAS_SCRIPT_OSMANYA, /* Osma */ - EVAS_SCRIPT_SHAVIAN, /* Shaw */ - EVAS_SCRIPT_LINEAR_B, /* Linb */ - EVAS_SCRIPT_TAI_LE, /* Tale */ - EVAS_SCRIPT_UGARITIC, /* Ugar */ - - /* Unicode-4.1 additions */ - EVAS_SCRIPT_NEW_TAI_LUE, /* Talu */ - EVAS_SCRIPT_BUGINESE, /* Bugi */ - EVAS_SCRIPT_GLAGOLITIC, /* Glag */ - EVAS_SCRIPT_TIFINAGH, /* Tfng */ - EVAS_SCRIPT_SYLOTI_NAGRI, /* Sylo */ - EVAS_SCRIPT_OLD_PERSIAN, /* Xpeo */ - EVAS_SCRIPT_KHAROSHTHI, /* Khar */ - - /* Unicode-5.0 additions */ - EVAS_SCRIPT_UNKNOWN, /* Zzzz */ - EVAS_SCRIPT_BALINESE, /* Bali */ - EVAS_SCRIPT_CUNEIFORM, /* Xsux */ - EVAS_SCRIPT_PHOENICIAN, /* Phnx */ - EVAS_SCRIPT_PHAGS_PA, /* Phag */ - EVAS_SCRIPT_NKO, /* Nkoo */ - - /* Unicode-5.1 additions */ - EVAS_SCRIPT_KAYAH_LI, /* Kali */ - EVAS_SCRIPT_LEPCHA, /* Lepc */ - EVAS_SCRIPT_REJANG, /* Rjng */ - EVAS_SCRIPT_SUNDANESE, /* Sund */ - EVAS_SCRIPT_SAURASHTRA, /* Saur */ - EVAS_SCRIPT_CHAM, /* Cham */ - EVAS_SCRIPT_OL_CHIKI, /* Olck */ - EVAS_SCRIPT_VAI, /* Vaii */ - EVAS_SCRIPT_CARIAN, /* Cari */ - EVAS_SCRIPT_LYCIAN, /* Lyci */ - EVAS_SCRIPT_LYDIAN, /* Lydi */ - - /* Unicode-5.2 additions */ - EVAS_SCRIPT_AVESTAN, /* Avst */ - EVAS_SCRIPT_BAMUM, /* Bamu */ - EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ - EVAS_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ - EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ - EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ - EVAS_SCRIPT_JAVANESE, /* Java */ - EVAS_SCRIPT_KAITHI, /* Kthi */ - EVAS_SCRIPT_LISU, /* Lisu */ - 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 */ - - /* 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, size_t len); - -Evas_Script_Type -evas_common_language_char_script_get(Eina_Unicode unicode); - -const char * -evas_common_language_from_locale_get(void); -#endif - diff --git a/libraries/evas/src/lib/engines/common/language/evas_script_table.h b/libraries/evas/src/lib/engines/common/language/evas_script_table.h deleted file mode 100644 index dd77db0..0000000 --- a/libraries/evas/src/lib/engines/common/language/evas_script_table.h +++ /dev/null @@ -1,3087 +0,0 @@ -/* 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/libraries/evas/src/lib/engines/common_16/Makefile.am b/libraries/evas/src/lib/engines/common_16/Makefile.am deleted file mode 100644 index ef2ab30..0000000 --- a/libraries/evas/src/lib/engines/common_16/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@VALGRIND_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EET_CFLAGS@ \ -@pthread_cflags@ - -noinst_LTLIBRARIES = libevas_engine_common_16.la - -libevas_engine_common_16_la_SOURCES = \ -evas_soft16_dither_mask.c \ -evas_soft16_font.c \ -evas_soft16_image_scaled_sampled.c \ -evas_soft16_image_unscaled.c \ -evas_soft16_main.c \ -evas_soft16_rectangle.c \ -evas_soft16_line.c \ -evas_soft16_polygon.c - -libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h - -EXTRA_DIST = \ -evas_soft16_point_blend.c \ -evas_soft16_scanline_blend.c \ -evas_soft16_scanline_fill.c diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.in b/libraries/evas/src/lib/engines/common_16/Makefile.in deleted file mode 100644 index 196395d..0000000 --- a/libraries/evas/src/lib/engines/common_16/Makefile.in +++ /dev/null @@ -1,702 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common_16 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_engine_common_16_la_LIBADD = -am_libevas_engine_common_16_la_OBJECTS = evas_soft16_dither_mask.lo \ - evas_soft16_font.lo evas_soft16_image_scaled_sampled.lo \ - evas_soft16_image_unscaled.lo evas_soft16_main.lo \ - evas_soft16_rectangle.lo evas_soft16_line.lo \ - evas_soft16_polygon.lo -libevas_engine_common_16_la_OBJECTS = \ - $(am_libevas_engine_common_16_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_engine_common_16_la_SOURCES) -DIST_SOURCES = $(libevas_engine_common_16_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@VALGRIND_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EET_CFLAGS@ \ -@pthread_cflags@ - -noinst_LTLIBRARIES = libevas_engine_common_16.la -libevas_engine_common_16_la_SOURCES = \ -evas_soft16_dither_mask.c \ -evas_soft16_font.c \ -evas_soft16_image_scaled_sampled.c \ -evas_soft16_image_unscaled.c \ -evas_soft16_main.c \ -evas_soft16_rectangle.c \ -evas_soft16_line.c \ -evas_soft16_polygon.c - -libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h -EXTRA_DIST = \ -evas_soft16_point_blend.c \ -evas_soft16_scanline_blend.c \ -evas_soft16_scanline_fill.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_engine_common_16.la: $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_dither_mask.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_font.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_scaled_sampled.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_unscaled.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_line.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_polygon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_rectangle.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c deleted file mode 100644 index 566efac..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c +++ /dev/null @@ -1,293 +0,0 @@ -#include "evas_common_soft16.h" - -#define S16_DM_SIZE 128 -#define S16_DM_BITS 6 -#define S16_DM_DIV 64 -#define S16_DM_MSK (S16_DM_SIZE - 1) -#define S16_DM_SHF(_b) (S16_DM_BITS - (8 - _b)) - -static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] = -{ - { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, - { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, - { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, - { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, - { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, - { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, - { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, - { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, - { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, - { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, - { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, - { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, - { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, - { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, - { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, - { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, - { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, - { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, - { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, - { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, - { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, - { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, - { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, - { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, - { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, - { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, - { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, - { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, - { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, - { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, - { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, - { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, - { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, - { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, - { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, - { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, - { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, - { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, - { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, - { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, - { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, - { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, - { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, - { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, - { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, - { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, - { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, - { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, - { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, - { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, - { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, - { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, - { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, - { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, - { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, - { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, - { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, - { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, - { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, - { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, - { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, - { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, - { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, - { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, - { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, - { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, - { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, - { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, - { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, - { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, - { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, - { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, - { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, - { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, - { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, - { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, - { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, - { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, - { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, - { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, - { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, - { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, - { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, - { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, - { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, - { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, - { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, - { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, - { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, - { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, - { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, - { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, - { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, - { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, - { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, - { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, - { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, - { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, - { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, - { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, - { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, - { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, - { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, - { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, - { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, - { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, - { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, - { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, - { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, - { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, - { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, - { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, - { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, - { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, - { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, - { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, - { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, - { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, - { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, - { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, - { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, - { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, - { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, - { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, - { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, - { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, - { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, - { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } -}; - -EFL_ALWAYS_INLINE void -_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha, - const int x, const int y) -{ - DATA8 orig_r, orig_g, orig_b, orig_a; - - orig_r = R_VAL(src); - orig_g = G_VAL(src); - orig_b = B_VAL(src); - orig_a = A_VAL(src); - - if (orig_a == 255) - { - DATA8 dith5, dith6, dith, r, g, b; - - dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; - dith5 = dith >> S16_DM_SHF(5); - dith6 = dith >> S16_DM_SHF(6); - - r = orig_r >> 3; - g = orig_g >> 2; - b = orig_b >> 3; - - if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; - if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; - if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; - - *dst = (r << 11) | (g << 5) | b; - *alpha = 31; - } - else if (orig_a == 0) - { - *dst = 0; - *alpha = 0; - } - else - { - DATA8 r, g, b, a; - r = orig_r >> 3; - g = orig_g >> 2; - b = orig_b >> 3; - a = (orig_a >> 3) + 1; - - *dst = (r << 11) | (g << 5) | b; - *alpha = a; - } -} - -static inline void -_soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst, - DATA8 *alpha, const int y, const int w) -{ - int x, m; - - m = (w & ~7); - x = 0; - pld(src, 0); - - while (x < m) - { - pld(src, 32); - UNROLL8({ - _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); - src++; - dst++; - alpha++; - x++; - }); - } - - for (; x < w; x++, src++, dst++, alpha++) - _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); -} - -void -evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src) -{ - const DATA32 *sp; - DATA16 *dp; - DATA8 *ap; - unsigned int y; - - sp = src; - dp = im->pixels; - ap = im->alpha; - - for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) - _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w); -} - -EFL_ALWAYS_INLINE void -_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst, - const int x, const int y) -{ - DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith; - - orig_r = R_VAL(src); - orig_g = G_VAL(src); - orig_b = B_VAL(src); - - r = orig_r >> 3; - g = orig_g >> 2; - b = orig_b >> 3; - - dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; - dith5 = dith >> S16_DM_SHF(5); - dith6 = dith >> S16_DM_SHF(6); - - if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; - if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; - if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; - - *dst = (r << 11) | (g << 5) | b; -} - -static inline void -_soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y, - const int w) -{ - int x, m; - - m = (w & ~7); - x = 0; - pld(src, 0); - - while (x < m) - { - pld(src, 32); - UNROLL8({ - _soft16_convert_from_rgb_pt(src, dst, x, y); - src++; - dst++; - x++; - }); - } - - for (; x < w; x++, src++, dst++) - _soft16_convert_from_rgb_pt(src, dst, x, y); -} - -void -evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src) -{ - const DATA32 *sp; - DATA16 *dp; - unsigned int y; - - sp = src; - dp = im->pixels; - - for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride) - _soft16_convert_from_rgb_scanline(sp, dp, y, im->cache_entry.w); -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c deleted file mode 100644 index fbad4d2..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_font.c +++ /dev/null @@ -1,295 +0,0 @@ -#include "evas_common_soft16.h" - -EFL_ALWAYS_INLINE void -_glyph_pt_mask_solid_solid(DATA16 *dst, - const DATA16 rgb565, - const DATA32 rgb565_unpack, - const DATA8 *mask) -{ - DATA8 alpha = *mask >> 3; - - if (alpha == 31) *dst = rgb565; - else if (alpha > 0) - { - DATA32 d; - - d = RGB_565_UNPACK(*dst); - d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha); - *dst = RGB_565_PACK(d); - } -} - -static void -_glyph_scanline_mask_solid_solid(DATA16 *dst, - int size, - const DATA16 rgb565, - const DATA32 rgb565_unpack, - const DATA8 *mask) -{ - DATA16 *start, *end; - - start = dst; - pld(start, 0); - pld(mask, 0); - end = start + (size & ~3); - - while (start < end) - { - pld(start, 16); - pld(mask, 4); - UNROLL4({ - _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); - start++; - mask++; - }); - } - - end = start + (size & 3); - for (; start < end; start++, mask++) - _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); -} - -EFL_ALWAYS_INLINE void -_glyph_pt_mask_transp_solid(DATA16 *dst, - DATA32 rgb565_unpack, - DATA8 alpha, - const DATA8 *mask) -{ - DATA32 a, b; - int rel_alpha; - - rel_alpha = *mask >> 3; - alpha = (alpha * rel_alpha) >> 5; - if (alpha == 0) - return; - - alpha++; - - a = ((rgb565_unpack * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; - b = RGB_565_UNPACK(*dst); - b = RGB_565_UNPACKED_BLEND(a, b, alpha); - *dst = RGB_565_PACK(b); -} - -static void -_glyph_scanline_mask_transp_solid(DATA16 *dst, - int size, - const DATA32 rgb565_unpack, - const DATA8 rel_alpha, - const DATA8 *mask) -{ - DATA16 *start, *end; - - start = dst; - pld(start, 0); - pld(mask, 0); - end = start + (size & ~3); - - while (start < end) - { - pld(start, 16); - pld(mask, 4); - UNROLL4({ - _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); - start++; - mask++; - }); - } - - end = start + (size & 3); - for (; start < end; start++, mask++) - _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); -} - -static inline void -_calc_ext(const Soft16_Image *dst, const RGBA_Draw_Context *dc, - Eina_Rectangle *ext) -{ - EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - - if (dc->clip.use) - { - int v; - - EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - if (ext->x < 0) - { - ext->w += ext->x; - ext->x = 0; - } - if (ext->y < 0) - { - ext->h += ext->y; - ext->y = 0; - } - - v = dst->cache_entry.w - ext->x; - if (ext->w > v) ext->w = v; - - v = dst->cache_entry.h - ext->y; - if (ext->h > v) ext->h = v; - } -} - -static inline void -_glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask, - const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, - int w, DATA8 alpha, const DATA16 rgb565, - const DATA32 rgb565_unpack) -{ - int size, in_x, in_w; - DATA16 *p_pixels; - - if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return; - - in_x = 0; - in_w = 0; - - if (dx + w > max_x) in_w += (dx + w) - max_x; - - if (dx < ext.x) - { - in_w += ext.x - dx; - in_x = ext.x - dx; - dx = ext.x; - } - - size = w - in_w; - p_pixels = dst->pixels + (dy * dst->stride) + dx; - p_mask += in_x; - - if (size > 1) - { - if (alpha == 31) - _glyph_scanline_mask_solid_solid - (p_pixels, size, rgb565, rgb565_unpack, p_mask); - else if (alpha != 0) - _glyph_scanline_mask_transp_solid - (p_pixels, size, rgb565_unpack, alpha, p_mask); - } - else if (size == 1) - { - if (alpha == 31) - _glyph_pt_mask_solid_solid(p_pixels, rgb565, rgb565_unpack, p_mask); - else if (alpha != 0) - _glyph_pt_mask_transp_solid(p_pixels, rgb565_unpack, alpha, p_mask); - } -} - -static void -_soft16_font_glyph_draw_grayscale(Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, - int x, int y, DATA8 alpha, DATA16 rgb565, - const Eina_Rectangle ext, int bw, int bh, - int bpitch, const DATA8 *bitmap) -{ - const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); - int i, max_x, max_y; - - max_x = ext.x + ext.w; - max_y = ext.y + ext.h; - - for (i = 0; i < bh; i++, bitmap += bpitch) - _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, - alpha, rgb565, rgb565_unpack); -} - -static inline void -_glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w) -{ - const DATA8 bitrepl[2] = {0x0, 0xff}; - int i; - - for (i = 0; i < w; i += 8, bitmap++) - { - int j, size; - DATA32 bits; - - if (i + 8 < w) size = 8; - else size = w - i; - - bits = *bitmap; - - for (j = size - 1; j >= 0; j--, mask++) - *mask = bitrepl[(bits >> j) & 0x1]; - } -} - -static void -_soft16_font_glyph_draw_mono(Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, - int x, int y, DATA8 alpha, DATA16 rgb565, - const Eina_Rectangle ext, int bw, int bh, - int bpitch, const DATA8 *bitmap) -{ - const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); - DATA8 *mask; - int i, max_x, max_y; - - max_x = ext.x + ext.w; - max_y = ext.y + ext.h; - - mask = alloca(bpitch); - for (i = 0; i < bh; i++, bitmap += bpitch) - { - _glyph_create_mask_line(mask, bitmap, bw); - _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, - alpha, rgb565, rgb565_unpack); - } -} - -void -evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, - RGBA_Font_Glyph *fg, int x, int y) -{ - Soft16_Image *dst; - RGBA_Draw_Context *dc; - const DATA8 *bitmap; - DATA8 alpha, r, g, b; - DATA16 rgb565; - Eina_Rectangle ext; - int bpitch, bw, bh; - - dst = data; - dc = context; - - alpha = A_VAL(&dc->col.col) >> 3; - if (alpha == 0) return; /* precision is 5 bits, 3 bits lost */ - - r = R_VAL(&dc->col.col) >> 3; - g = G_VAL(&dc->col.col) >> 2; - b = B_VAL(&dc->col.col) >> 3; - - if (r > alpha) r = alpha; - if (g > (alpha << 1)) g = (alpha << 1); - if (b > alpha) b = alpha; - - rgb565 = (r << 11) | (g << 5) | b; - - bitmap = fg->glyph_out->bitmap.buffer; - bh = fg->glyph_out->bitmap.rows; - bw = fg->glyph_out->bitmap.width; - bpitch = fg->glyph_out->bitmap.pitch; - if (bpitch < bw) bpitch = bw; - - _calc_ext(dst, dc, &ext); - - if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) - _soft16_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, rgb565, - ext, bw, bh, bpitch, bitmap); - else - _soft16_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, rgb565, - ext, bw, bh, bpitch, bitmap); -} - -void * -evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__) -{ - return (void *)1; /* core requires != NULL to work */ -} - -void -evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__) -{ -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c deleted file mode 100644 index 9c9f03c..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c +++ /dev/null @@ -1,471 +0,0 @@ -#include "evas_common_soft16.h" -#include "evas_soft16_point_blend.c" - -static void -_soft16_image_draw_scaled_solid_solid(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8({ - _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); - } -} -static void -_soft16_image_draw_scaled_transp_solid(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8({ - int off_x = offset_x[x]; - _soft16_pt_blend_transp_solid(d, s[off_x], a[off_x]); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); - } -} - -static inline void -_soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_scaled_transp_solid - (src, dst, dc, dst_offset, w, h, offset_x, offset_y); - else if (!dst->cache_entry.flags.alpha) - _soft16_image_draw_scaled_solid_solid - (src, dst, dc, dst_offset, w, h, offset_x, offset_y); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); -} - -static void -_soft16_image_draw_scaled_solid_solid_mul_alpha(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 alpha) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_alpha - (d, s[offset_x[x]], alpha); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_solid_solid_mul_alpha - (d, s[offset_x[x]], alpha); - } -} - -static void -_soft16_image_draw_scaled_transp_solid_mul_alpha(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 alpha) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8({ - int off_x = offset_x[x]; - _soft16_pt_blend_transp_solid_mul_alpha - (d, s[off_x], a[off_x], alpha); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_transp_solid_mul_alpha - (d, s[offset_x[x]], a[offset_x[x]], alpha); - } -} - -static inline void -_soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, DATA8 a) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_scaled_transp_solid_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else if (!dst->cache_entry.flags.alpha) - _soft16_image_draw_scaled_solid_solid_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); -} - -static void -_soft16_image_draw_scaled_solid_solid_mul_color(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 r, DATA8 g, DATA8 b, - DATA8 alpha) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - - if (alpha == 31) - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_color_solid - (d, s[offset_x[x]], r, g, b); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_solid_solid_mul_color_solid - (d, s[offset_x[x]], r, g, b); - } - else - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_color_transp - (d, s[offset_x[x]], alpha, r, g, b); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_solid_solid_mul_color_transp - (d, s[offset_x[x]], alpha, r, g, b); - } -} - -static void -_soft16_image_draw_scaled_transp_solid_mul_color(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 r, DATA8 g, DATA8 b, - DATA8 alpha) -{ - DATA16 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - - if (alpha == 31) - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8({ - int off_x = offset_x[x]; - _soft16_pt_blend_transp_solid_mul_color_solid - (d, s[off_x], a[off_x], r, g, b); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_transp_solid_mul_color_solid - (d, s[offset_x[x]], a[offset_x[x]], r, g, b); - } - else - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA16 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8({ - int off_x = offset_x[x]; - _soft16_pt_blend_transp_solid_mul_color_transp - (d, s[off_x], a[off_x], alpha, r, g, b); - x++; - d++; - }); - } - - for (; x < w; x++, d++) - _soft16_pt_blend_transp_solid_mul_color_transp - (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); - } -} - -static inline void -_soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 r, DATA8 g, DATA8 b, DATA8 a) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_scaled_transp_solid_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); - else if (!dst->cache_entry.flags.alpha) - _soft16_image_draw_scaled_solid_solid_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); -} - -static inline void -_soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, DATA8 r, DATA8 g, - DATA8 b, DATA8 a) -{ - if ((a == r) && (a == (g >> 1)) && (a == b)) - _soft16_image_draw_scaled_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else - _soft16_image_draw_scaled_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); -} - -void -evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - const Eina_Rectangle sr, - const Eina_Rectangle dr, - const Eina_Rectangle cr) -{ - int x, y, dst_offset, *offset_x, *offset_y; - DATA16 mul_rgb565; - DATA8 r, g, b, a; - - if (!dc->mul.use) - { - r = b = a = 31; - g = 63; - mul_rgb565 = 0xffff; - } - else - { - a = A_VAL(&dc->mul.col) >> 3; - if (a == 0) - return; - - r = R_VAL(&dc->mul.col) >> 3; - g = G_VAL(&dc->mul.col) >> 2; - b = B_VAL(&dc->mul.col) >> 3; - - if (r > a) r = a; - if (g > (a << 1)) g = (a << 1); - if (b > a) b = a; - - mul_rgb565 = (r << 11) || (g << 5) | b; - } - - /* pre-calculated scale tables */ - offset_x = alloca(cr.w * sizeof(*offset_x)); - for (x = 0; x < cr.w; x++) - offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; - - offset_y = alloca(cr.h * sizeof(*offset_y)); - for (y = 0; y < cr.h; y++) - offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) - * src->stride); - - dst_offset = cr.x + (cr.y * dst->stride); - - - if (mul_rgb565 == 0xffff) - _soft16_image_draw_scaled_no_mul - (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); - else - _soft16_image_draw_scaled_mul - (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a); -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c deleted file mode 100644 index f53fdf0..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c +++ /dev/null @@ -1,287 +0,0 @@ -#include "evas_common_soft16.h" -#include "evas_soft16_scanline_blend.c" - -static void -_soft16_image_draw_unscaled_solid_solid(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, int dst_offset, - int w, int h) -{ - DATA16 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_solid_solid(src_itr, dst_itr, w); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft16_image_draw_unscaled_transp_solid(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, int dst_offset, - int w, int h) - -{ - DATA16 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int src_offset, int dst_offset, - int width, int height) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_transp_solid(src, dst, dc, - src_offset, dst_offset, - width, height); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_solid_solid(src, dst, dc, - src_offset, dst_offset, - width, height); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); -} - -static void -_soft16_image_draw_unscaled_solid_solid_mul_alpha(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, - int dst_offset, - int w, int h, DATA8 a) -{ - DATA16 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft16_image_draw_unscaled_transp_solid_mul_alpha(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, - int dst_offset, - int w, int h, DATA8 a) - -{ - DATA16 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, - dst_itr, w, a); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int src_offset, int dst_offset, - int width, int height, DATA8 a) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_transp_solid_mul_alpha - (src, dst, dc, src_offset, dst_offset, width, height, a); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_solid_solid_mul_alpha - (src, dst, dc, src_offset, dst_offset, width, height, a); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); -} - -static void -_soft16_image_draw_unscaled_solid_solid_mul_color(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, - int dst_offset, - int w, int h, DATA8 r, - DATA8 g, DATA8 b, DATA8 a) -{ - DATA16 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - if (a == 31) - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_solid_solid_mul_color_solid - (src_itr, dst_itr, w, r, g, b); - src_itr += src->stride; - dst_itr += dst->stride; - } - else - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_solid_solid_mul_color_transp - (src_itr, dst_itr, w, a, r, g, b); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft16_image_draw_unscaled_transp_solid_mul_color(Soft16_Image *src, - Soft16_Image *dst, - RGBA_Draw_Context *dc __UNUSED__, - int src_offset, - int dst_offset, - int w, int h, DATA8 r, - DATA8 g, DATA8 b, DATA8 a) - -{ - DATA16 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - if (a == 31) - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_transp_solid_mul_color_solid - (src_itr, alpha_itr, dst_itr, w, r, g, b); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } - else - for (y = 0; y < h; y++) - { - _soft16_scanline_blend_transp_solid_mul_color_transp - (src_itr, alpha_itr, dst_itr, w, a, r, g, b); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int src_offset, int dst_offset, - int width, int height, - DATA8 r, DATA8 g, DATA8 b, DATA8 a) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_transp_solid_mul_color - (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft16_image_draw_unscaled_solid_solid_mul_color - (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); -} - -static inline void -_soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - int src_offset, int dst_offset, - int width, int height, DATA8 r, DATA8 g, - DATA8 b, DATA8 a) -{ - if ((a == r) && (a == (g >> 1)) && (a == b)) - _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, - dst_offset, width, height, a); - else - _soft16_image_draw_unscaled_mul_color(src, dst, dc, src_offset, - dst_offset, width, height, - r, g, b, a); -} - -void -evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - const Eina_Rectangle sr, - const Eina_Rectangle dr, - const Eina_Rectangle cr) -{ - int src_offset_rows, src_offset, dst_offset; - DATA16 mul_rgb565; - DATA8 r, g, b, a; - - if (!dc->mul.use) - { - r = b = a = 31; - g = 63; - mul_rgb565 = 0xffff; - } - else - { - a = A_VAL(&dc->mul.col) >> 3; - if (a == 0) - return; - - r = R_VAL(&dc->mul.col) >> 3; - g = G_VAL(&dc->mul.col) >> 2; - b = B_VAL(&dc->mul.col) >> 3; - - if (r > a) r = a; - if (g > (a << 1)) g = (a << 1); - if (b > a) b = a; - - mul_rgb565 = (r << 11) || (g << 5) | b; - } - - - src_offset_rows = (cr.y - dr.y) + sr.y; - src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; - - dst_offset = cr.x + (cr.y * dst->stride); - - if (mul_rgb565 == 0xffff) - _soft16_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, - cr.w, cr.h); - else - _soft16_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, - cr.w, cr.h, r, g, b, a); -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c deleted file mode 100644 index 92e14af..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_line.c +++ /dev/null @@ -1,444 +0,0 @@ -#include "evas_common_soft16.h" -#include "evas_soft16_scanline_fill.c" - -/* - * All functions except by evas_common_soft16_line_draw() expect x0 <= x1. - */ - -static inline int -_in_range(int value, int min, int max) -{ - return min <= value && value <= max; -} - -static inline int -_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - if (!_in_range(x, clip.x, clip.x + clip.w - 1)) - return 0; - - if (!_in_range(y, clip.y, clip.y + clip.h - 1)) - return 0; - - return 1; -} - -static inline int -_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - return _in_range(x, clip.x, clip.x + clip.w - 1); -} - -static inline int -_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - return _in_range(y, clip.y, clip.y + clip.h - 1); -} - -static inline int -_is_xy_inside_rect(int x, int y, int w, int h) -{ - return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); -} - -static inline int -_is_empty_clip(const struct RGBA_Draw_Context_clip clip) -{ - return clip.w < 1 || clip.h < 1; -} - -static void -_soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y) -{ - DATA16 rgb565, *dst_itr; - DATA8 alpha; - - if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) - return; - - if (!_is_xy_inside_clip(x, y, dc->clip)) - return; - - dst_itr = dst->pixels + (dst->stride * y) + x; - alpha = A_VAL(&dc->col.col) >> 3; - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - - if (alpha == 31) - _soft16_pt_fill_solid_solid(dst_itr, rgb565); - else if (alpha > 0) - { - DATA32 rgb565_unpack; - - rgb565_unpack = RGB_565_UNPACK(rgb565); - alpha++; - _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); - } -} - -static void -_soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y) -{ - DATA16 rgb565, *dst_itr; - DATA8 alpha; - int w; - - if (!_is_y_inside_clip(y, dc->clip)) - return; - - if (x0 < dc->clip.x) - x0 = dc->clip.x; - - if (x1 >= dc->clip.x + dc->clip.w) - x1 = dc->clip.x + dc->clip.w - 1; - - w = x1 - x0; - if (w < 1) - return; - - dst_itr = dst->pixels + (dst->stride * y) + x0; - alpha = A_VAL(&dc->col.col) >> 3; - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - - if (alpha == 31) - _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); - else if (alpha > 0) - { - DATA32 rgb565_unpack; - - rgb565_unpack = RGB_565_UNPACK(rgb565); - alpha++; - _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); - } -} - -static void -_soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1) -{ - DATA16 rgb565, *dst_itr; - DATA8 alpha; - int h; - - if (!_is_x_inside_clip(x, dc->clip)) - return; - - if (y1 < y0) - { - int t; - t = y0; - y0 = y1; - y1 = t; - } - - if (y0 < dc->clip.y) - y0 = dc->clip.y; - - if (y1 >= dc->clip.y + dc->clip.h) - y1 = dc->clip.y + dc->clip.h - 1; - - h = y1 - y0; - if (h < 1) - return; - - dst_itr = dst->pixels + (dst->stride * y0) + x; - alpha = A_VAL(&dc->col.col) >> 3; - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - - if (alpha == 31) - { - for (; h > 0; h--, dst_itr += dst->stride) - _soft16_pt_fill_solid_solid(dst_itr, rgb565); - } - else if (alpha > 0) - { - DATA32 rgb565_unpack; - - rgb565_unpack = RGB_565_UNPACK(rgb565); - alpha++; - - for (; h > 0; h--, dst_itr += dst->stride) - _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); - } -} - -static inline void -_soft16_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1) -{ - int diff, dy, x0, y0, x1, y1; - - x0 = *p_x0; - y0 = *p_y0; - x1 = *p_x1; - y1 = *p_y1; - - dy = y1 - y0; - - diff = clip.x - x0; - if (diff > 0) - { - x0 = clip.x; - y0 += (dy > 0) ? diff : -diff; - } - - diff = x1 - (clip.x + clip.w); - if (diff > 0) - { - x1 = clip.x + clip.w; - y1 += (dy > 0) ? -diff : diff; - } - - if (dy > 0) - { - diff = clip.y - y0; - if (diff > 0) - { - y0 = clip.y; - x0 += diff; - } - - diff = y1 - (clip.y + clip.h); - if (diff > 0) - { - y1 = clip.y + clip.h; - x1 -= diff; - } - } - else - { - diff = clip.y - y1; - if (diff > 0) - { - y1 = clip.y; - x1 -= diff; - } - - diff = y0 - (clip.y + clip.h - 1); - if (diff > 0) - { - y0 = clip.y + clip.h - 1; - x0 += diff; - } - } - - *p_x0 = x0; - *p_y0 = y0; - *p_x1 = x1; - *p_y1 = y1; -} - -static void -_soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int dy, step_dst_itr, len; - DATA8 alpha; - DATA16 *dst_itr, rgb565; - - alpha = A_VAL(&dc->col.col) >> 3; - if (alpha < 1) - return; - - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - - dy = y1 - y0; - step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); - - _soft16_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); - - len = (dy > 0) ? (y1 - y0) : (y0 - y1); - if (len < 1) - return; - - dst_itr = dst->pixels + dst->stride * y0 + x0; - if (alpha == 31) - { - for (; len > 0; len--, dst_itr += step_dst_itr) - _soft16_pt_fill_solid_solid(dst_itr, rgb565); - } - else - { - DATA32 rgb565_unpack; - - rgb565_unpack = RGB_565_UNPACK(rgb565); - alpha++; - for (; len > 0; len--, dst_itr += step_dst_itr) - _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); - } -} - -EFL_ALWAYS_INLINE void -_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha) -{ - if (alpha == 32) - _soft16_pt_fill_solid_solid(dst_itr, rgb565); - else - _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); -} - -static void -_soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - int dx, dy, step_y, step_dst_itr; - DATA32 rgb565_unpack; - DATA16 rgb565; - DATA8 alpha; - - alpha = A_VAL(&dc->col.col) >> 3; - if (alpha == 0) - return; - alpha++; - - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - rgb565_unpack = RGB_565_UNPACK(rgb565); - - dx = x1 - x0; - dy = y1 - y0; - - if (dy >= 0) - { - step_y = 1; - step_dst_itr = dst->stride; - } - else - { - dy = -dy; - step_y = -1; - step_dst_itr = -dst->stride; - } - - if (dx > dy) - { - DATA16 *dst_itr; - int e, x, y; - - e = - (dx / 2); - y = y0; - dst_itr = dst->pixels + dst->stride * y0 + x0; - for (x=x0; x <= x1; x++, dst_itr++) - { - if (_is_xy_inside_clip(x, y, dc->clip)) - _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); - - e += dy; - if (e >= 0) - { - dst_itr += step_dst_itr; - y += step_y; - e -= dx; - } - } - } - else - { - DATA16 *dst_itr; - int e, x, y; - - e = - (dy / 2); - x = x0; - dst_itr = dst->pixels + dst->stride * y0 + x0; - for (y=y0; y != y1; y += step_y, dst_itr += step_dst_itr) - { - if (_is_xy_inside_clip(x, y, dc->clip)) - _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); - - e += dx; - if (e >= 0) - { - dst_itr++; - x++; - e -= dy; - } - } - } -} - -void -evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) -{ - struct RGBA_Draw_Context_clip c_bkp, c_tmp; - int dx, dy; - int x, y, w, h; - - c_tmp.use = 1; - c_tmp.x = 0; - c_tmp.y = 0; - c_tmp.w = dst->cache_entry.w; - c_tmp.h = dst->cache_entry.h; - - /* save out clip info */ - c_bkp = dc->clip; - if (c_bkp.use) - { - RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, - c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); - if (_is_empty_clip(c_tmp)) - return; - } - - x = MIN(x0, x1); - y = MIN(y0, y1); - w = MAX(x0, x1) - x + 1; - h = MAX(y0, y1) - y + 1; - - RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); - if (_is_empty_clip(c_tmp)) - return; - - /* Check if the line doesn't cross the clip area */ - if (x0 < c_tmp.x && x1 < c_tmp.x) - return; - if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) - return; - if (y0 < c_tmp.y && y1 < c_tmp.y) - return; - if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) - return; - - dc->clip = c_tmp; - dx = x1 - x0; - dy = y1 - y0; - - if (dx < 0) - { - int t; - - t = x0; - x0 = x1; - x1 = t; - - t = y0; - y0 = y1; - y1 = t; - } - - if (dx == 0 && dy == 0) - _soft16_line_point(dst, dc, x0, y0); - else if (dx == 0) - _soft16_line_vert(dst, dc, x0, y0, y1); - else if (dy == 0) - _soft16_line_horiz(dst, dc, x0, x1, y0); - else if (dy == dx || dy == -dx) - _soft16_line_45deg(dst, dc, x0, y0, x1, y1); - else - _soft16_line_aliased(dst, dc, x0, y0, x1, y1); - - /* restore clip info */ - dc->clip = c_bkp; -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c deleted file mode 100644 index 6028744..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_main.c +++ /dev/null @@ -1,594 +0,0 @@ -#include "evas_common_soft16.h" - -static Evas_Cache_Image *eci = NULL; -static int reference = 0; - -static Image_Entry *_evas_common_soft16_image_new(void); -static void _evas_common_soft16_image_delete(Image_Entry *ie); - -static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); -static void _evas_common_soft16_image_surface_delete(Image_Entry *ie); -static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie); - -static int _evas_common_load_soft16_image_from_file(Image_Entry *ie); -static void _evas_common_soft16_image_unload(Image_Entry *ie); - -static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); -static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src); - -static int _evas_common_soft16_image_ram_usage(Image_Entry *ie); - -static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h); -static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); -static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace); - -static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie); - -/* static void */ -/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */ -/* { */ -/* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */ -/* } */ - -static const Evas_Cache_Image_Func _evas_common_soft16_image_func = -{ - _evas_common_soft16_image_new, - _evas_common_soft16_image_delete, - _evas_common_soft16_image_surface_alloc, - _evas_common_soft16_image_surface_delete, - _evas_common_soft16_image_surface_pixels, - _evas_common_load_soft16_image_from_file, - _evas_common_soft16_image_unload, - _evas_common_soft16_image_dirty_region, - _evas_common_soft16_image_dirty, - _evas_common_soft16_image_size_set, - _evas_common_soft16_image_from_copied_data, - _evas_common_soft16_image_from_data, - _evas_common_soft16_image_colorspace_set, - _evas_common_load_soft16_image_data_from_file, - _evas_common_soft16_image_ram_usage, -/* _evas_common_soft16_image_debug */ - NULL -}; - -EAPI void -evas_common_soft16_image_init(void) -{ - if (!eci) - eci = evas_cache_image_init(&_evas_common_soft16_image_func); - reference++; -} - -EAPI void -evas_common_soft16_image_shutdown(void) -{ - if (--reference == 0) - { -// DISABLE for now - something wrong with cache shutdown freeing things -// still in use - rage_thumb segv's now. -// -// actually - i think i see it. cache ref goes to 0 (and thus gets freed) -// because in eng_setup() when a buffer changes size it is FIRST freed -// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately -// where it should stay at 1. - see evas_engine.c in the buffer enigne for -// example. eng_output_free() is called BEFORE _output_setup(). although this -// is only a SIGNE of the problem. we can patch this up with either freeing -// after the setup (so we just pt a ref of 2 then back to 1), or just -// evas_common_image_init() at the start and evas_common_image_shutdown() -// after it all. really ref 0 should only be reached when no more canvases -// with no more objects exist anywhere. - -// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. - evas_cache_image_shutdown(eci); - eci = NULL; - } -} - -EAPI Evas_Cache_Image * -evas_common_soft16_image_cache_get(void) -{ - return eci; -} - -static Image_Entry * -_evas_common_soft16_image_new(void) -{ - Soft16_Image *im; - - im = calloc(1, sizeof(Soft16_Image)); - if (!im) return NULL; - - im->stride = -1; - - return (Image_Entry *) im; -} - -static void -_evas_common_soft16_image_delete(Image_Entry *ie) -{ - memset(ie, 0xFF, sizeof (Soft16_Image)); - free(ie); -} - -static int -_evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) -{ - Soft16_Image *im = (Soft16_Image *) ie; - - if (im->stride < 0) im->stride = _calc_stride(w); - - im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); - if (!im->pixels) return -1; - - if (ie->flags.alpha) - { - im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); - im->flags.free_alpha = 0; - } - im->flags.free_pixels = 1; - - return 0; -} - -static void -_evas_common_soft16_image_surface_delete(Image_Entry *ie) -{ - Soft16_Image *im = (Soft16_Image *) ie; - - if (im->flags.free_pixels) - free(im->pixels); - im->pixels = NULL; - im->flags.free_pixels = 0; - - if (im->flags.free_alpha) - free(im->alpha); - im->alpha = NULL; - im->flags.free_alpha = 0; -} - -static DATA32 * -_evas_common_soft16_image_surface_pixels(Image_Entry *ie __UNUSED__) -{ - abort(); - - return NULL; -} - -static int -_evas_common_load_soft16_image_from_file(Image_Entry *ie) -{ - Soft16_Image *sim = (Soft16_Image *) ie; - RGBA_Image *im; - int error = 0; - - im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), sim->cache_entry.file, sim->cache_entry.key, &sim->cache_entry.load_opts, &error); - sim->source = im; - if (!sim->source) return -1; - - sim->cache_entry.w = sim->source->cache_entry.w; - sim->cache_entry.h = sim->source->cache_entry.h; - ie->flags.alpha = im->cache_entry.flags.alpha; - sim->cache_entry.info = im->cache_entry.info; - if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w); - - return 0; -} - -static void -_evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__) -{ -} - -static void -_evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) -{ -} - -static int -_evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) -{ - Soft16_Image *dst = (Soft16_Image *) ie_dst; - Soft16_Image *src = (Soft16_Image *) ie_src; - - evas_cache_image_load_data(&src->cache_entry); - evas_cache_image_surface_alloc(&dst->cache_entry, - src->cache_entry.w, src->cache_entry.h); - -/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ - - return 0; -} - -static int -_evas_common_soft16_image_ram_usage(Image_Entry *ie) -{ - Soft16_Image *im = (Soft16_Image *) ie; - - if (im->pixels && im->flags.free_pixels) - return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); - return 0; -} - -static int -_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__) -{ - Soft16_Image *dst = (Soft16_Image *) ie_dst; - Soft16_Image *im = (Soft16_Image *) ie_im; - - dst->flags = im->flags; - - return 0; -} - -static int -_evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__) -{ - Soft16_Image *im = (Soft16_Image *) ie_dst; - - /* FIXME: handle colorspace */ - ie_dst->w = w; - ie_dst->h = h; - ie_dst->flags.alpha = alpha; - - im->flags.free_pixels = 0; - im->flags.free_alpha = 0; - if (im->stride < 0) - im->stride = _calc_stride(w); - - /* FIXME: That's bad, the application must be aware of the engine internal. */ - im->pixels = (DATA16 *) image_data; - if (ie_dst->flags.alpha) - im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); - - return 0; -} - -static int -_evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__) -{ - Soft16_Image *im = (Soft16_Image *) ie_dst; - - /* FIXME: handle colorspace */ - if (image_data) - memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); - else - memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); - - return 0; -} - -static int -_evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst __UNUSED__, int cspace __UNUSED__) -{ - /* FIXME: handle colorspace */ - return 0; -} - -static int -_evas_common_load_soft16_image_data_from_file(Image_Entry *ie) -{ - Soft16_Image *im = (Soft16_Image *) ie; - - if (im->pixels) return 0; - if (!im->source) return -1; - - evas_cache_image_load_data(&im->source->cache_entry); - if (im->source->image.data) - { - DATA32 *sp; - - evas_cache_image_surface_alloc(&im->cache_entry, - im->source->cache_entry.w, - im->source->cache_entry.h); - - sp = im->source->image.data; - if (im->alpha) - evas_common_soft16_image_convert_from_rgba(im, sp); - else - evas_common_soft16_image_convert_from_rgb(im, sp); - } - evas_cache_image_drop(&im->source->cache_entry); - im->cache_entry.info.module = NULL; - im->cache_entry.info.loader = NULL; - im->source = NULL; - - return 0; -} - -/* Soft16_Image * */ -/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */ -/* int copy) */ -/* { */ -/* Soft16_Image *im; */ - -/* if (stride < 0) stride = _calc_stride(w); */ - -/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ -/* if (!im) return NULL; */ - -/* if (pixels) */ -/* { */ -/* if (copy) */ -/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ -/* else */ -/* { */ -/* im->pixels = pixels; */ -/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ -/* } */ -/* } */ -/* return im; */ -/* } */ - -static inline void -_get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im, - Eina_Rectangle *clip) -{ - if (dc->clip.use) - { - EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - if (clip->x < 0) - { - clip->w += clip->x; - clip->x = 0; - } - if (clip->y < 0) - { - clip->h += clip->y; - clip->y = 0; - } - if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x; - if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y; - } - else - { - EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); - } -} - -static inline int -_is_empty_rectangle(const Eina_Rectangle *r) -{ - return (r->w < 1) || (r->h < 1); -} - -static inline void -_shrink(int *s_pos, int *s_size, int pos, int size) -{ - int d; - - d = (*s_pos) - pos; - if (d < 0) - { - (*s_size) += d; - (*s_pos) = pos; - } - - d = size + pos - (*s_pos); - if ((*s_size) > d) - (*s_size) = d; -} - -static int -_soft16_adjust_areas(Eina_Rectangle *src, - int src_max_x, int src_max_y, - Eina_Rectangle *dst, - int dst_max_x, int dst_max_y, - Eina_Rectangle *dst_clip) -{ - if (_is_empty_rectangle(src) || - _is_empty_rectangle(dst) || - _is_empty_rectangle(dst_clip)) - return 0; - - /* shrink clip */ - _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); - _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); - if (_is_empty_rectangle(dst_clip)) return 0; - - /* sanitise x */ - if (src->x < 0) - { - dst->x -= (src->x * dst->w) / src->w; - dst->w += (src->x * dst->w) / src->w; - src->w += src->x; - src->x = 0; - } - if (src->x >= src_max_x) return 0; - if ((src->x + src->w) > src_max_x) - { - dst->w = (dst->w * (src_max_x - src->x)) / (src->w); - src->w = src_max_x - src->x; - } - if (dst->w <= 0) return 0; - if (src->w <= 0) return 0; - if (dst_clip->x < 0) - { - dst_clip->w += dst_clip->x; - dst_clip->x = 0; - } - if (dst_clip->w <= 0) return 0; - if (dst_clip->x >= dst_max_x) return 0; - - _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); - if (dst_clip->w <= 0) return 0; - - /* sanitise y */ - if (src->y < 0) - { - dst->y -= (src->y * dst->h) / src->h; - dst->h += (src->y * dst->h) / src->h; - src->h += src->y; - src->y = 0; - } - if (src->y >= src_max_y) return 0; - if ((src->y + src->h) > src_max_y) - { - dst->h = (dst->h * (src_max_y - src->y)) / (src->h); - src->h = src_max_y - src->y; - } - if (dst->h <= 0) return 0; - if (src->h <= 0) return 0; - if (dst_clip->y < 0) - { - dst_clip->h += dst_clip->y; - dst_clip->y = 0; - } - if (dst_clip->h <= 0) return 0; - if (dst_clip->y >= dst_max_y) return 0; - - _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); - if (dst_clip->h <= 0) return 0; - - return 1; -} - -static void -_soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - Eina_Rectangle sr, Eina_Rectangle dr) -{ - Eina_Rectangle cr; - - if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - _get_clip(dc, dst, &cr); - if (!_soft16_adjust_areas(&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr)) - return; - - if ((dr.w == sr.w) && (dr.h == sr.h)) - evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr); - else - evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); -} - -EAPI void -evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, - RGBA_Draw_Context *dc, - 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, - int smooth __UNUSED__) -{ - Eina_Rectangle sr, dr; - Cutout_Rects *rects; - Cutout_Rect *r; - struct RGBA_Draw_Context_clip clip_bkp; - int i; - - /* handle cutouts here! */ - EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h); - - if (_is_empty_rectangle(&dr)) return; - if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - - EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h); - - if (_is_empty_rectangle(&sr)) return; - if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); - return; - } - - /* save out clip info */ - clip_bkp = dc->clip; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip = clip_bkp; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; i++) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); - } - evas_common_draw_context_apply_clear_cutouts(rects); - dc->clip = clip_bkp; -} - -EAPI Soft16_Image * -evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha) -{ - Soft16_Image *new_im; - - if (im->cache_entry.flags.alpha == have_alpha) return im; - - new_im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry); - - new_im->cache_entry.flags.alpha = have_alpha; - - if (im->cache_entry.w > 0 - && im->cache_entry.h) - new_im = (Soft16_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h); - - return new_im; -} - -/* Soft16_Image * */ -/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */ -/* { */ -/* Soft16_Image *new_im; */ -/* DATA16 *dp, *sp; */ -/* int i, cw, ch, ew; */ - -/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ - -/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ - -/* if (old_im->cache_entry.w < new_im->cache_entry.w) */ -/* cw = old_im->cache_entry.w; */ -/* else */ -/* cw = new_im->cache_entry.w; */ - -/* ew = new_im->cache_entry.w - cw; */ - -/* if (old_im->cache_entry.h < new_im->cache_entry.h) */ -/* ch = old_im->cache_entry.h; */ -/* else */ -/* ch = new_im->cache_entry.h; */ - -/* dp = new_im->pixels; */ -/* sp = old_im->pixels; */ -/* for (i = 0; i < ch; i++) */ -/* { */ -/* memcpy(dp, sp, cw * sizeof(DATA16)); */ -/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ - -/* dp += new_im->stride; */ -/* sp += old_im->stride; */ -/* } */ - -/* if (old_im->flags.have_alpha) */ -/* { */ -/* DATA8 *dp, *sp; */ - -/* dp = new_im->alpha; */ -/* sp = old_im->alpha; */ -/* for (i = 0; i < ch; i++) */ -/* { */ -/* memcpy(dp, sp, cw * sizeof(DATA8)); */ -/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ - -/* dp += new_im->stride; */ -/* sp += old_im->stride; */ -/* } */ -/* } */ - -/* evas_cache_image_drop(&old_im->cache_entry); */ -/* return new_im; */ -/* } */ diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c deleted file mode 100644 index 8cd02d5..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c +++ /dev/null @@ -1,149 +0,0 @@ -/** NOTE: This file is meant to be included by users **/ - -/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. - ** this is due our division by 256 when multiplying the color. - **/ - -/***************************************************************************** - * Scanline processing - * - * _soft16_pt___[_]() - * - ****************************************************************************/ - -/*********************************************************************** - * Regular blend operations - */ - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha) -{ - if (alpha == 31) *p_dst = src; - else if (alpha != 0) - { - DATA32 a, b; - - a = RGB_565_UNPACK(src); - b = RGB_565_UNPACK(*p_dst); - b = RGB_565_UNPACKED_BLEND(a, b, alpha); - *p_dst = RGB_565_PACK(b); - } -} - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src) -{ - *p_dst = src; -} - -/*********************************************************************** - * Blend operations taking an extra alpha (fade in, out) - */ - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha) -{ - DATA32 a, b; - - alpha = (alpha * rel_alpha) >> 5; - if (alpha == 0) - return; - - alpha++; - - a = ((RGB_565_UNPACK(src) * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; - b = RGB_565_UNPACK(*p_dst); - b = RGB_565_UNPACKED_BLEND(a, b, alpha); - *p_dst = RGB_565_PACK(b); -} - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha) -{ - DATA32 a, b; - a = RGB_565_UNPACK(src); - b = RGB_565_UNPACK(*p_dst); - b = RGB_565_UNPACKED_BLEND_UNMUL(a, b, rel_alpha); - *p_dst = RGB_565_PACK(b); -} - -/*********************************************************************** - * Blend operations with extra alpha and multiply color - */ - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) -{ - DATA32 rgb, d; - int r1, g1, b1; - - alpha = (alpha * rel_alpha) >> 5; - if (alpha == 0) - return; - - alpha++; - - r1 = ((((src) >> 11) & 0x1f) * r) >> 5; - g1 = ((((src) >> 5) & 0x3f) * g) >> 6; - b1 = (((src) & 0x1f) * b) >> 5; - rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; - d = RGB_565_UNPACK(*p_dst); - d = RGB_565_UNPACKED_BLEND(rgb, d, alpha); - - *p_dst = RGB_565_PACK(d); -} - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) -{ - int r1, g1, b1; - DATA32 rgb, d; - - r1 = ((((src) >> 11) & 0x1f) * r) >> 5; - g1 = ((((src) >> 5) & 0x3f) * g) >> 6; - b1 = (((src) & 0x1f) * b) >> 5; - - rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; - d = RGB_565_UNPACK(*p_dst); - d = RGB_565_UNPACKED_BLEND(rgb, d, rel_alpha); - *p_dst = RGB_565_PACK(d); -} - -/*********************************************************************** - * Blend operations with extra multiply color - */ - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b) -{ - int r1, g1, b1; - - if (alpha == 0) return; - - r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; - g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; - b1 = (((src & 0x1f) * b) >> 5) & 0x1f; - - if (alpha == 31) *p_dst = (r1 << 11) | (g1 << 5) | b1; - else - { - DATA32 rgb_unpack, d; - - rgb_unpack = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; - d = RGB_565_UNPACK(*p_dst); - d = RGB_565_UNPACKED_BLEND(rgb_unpack, d, alpha); - *p_dst = RGB_565_PACK(d); - } -} - -EFL_ALWAYS_INLINE void -_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b) -{ - int r1, g1, b1; - - r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; - g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; - b1 = (((src & 0x1f) * b) >> 5) & 0x1f; - - *p_dst = (r1 << 11) | (g1 << 5) | b1; -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c deleted file mode 100644 index ca18bef..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c +++ /dev/null @@ -1,231 +0,0 @@ -#include -#include -#include "evas_soft16_scanline_fill.c" - -typedef struct _RGBA_Edge RGBA_Edge; -typedef struct _RGBA_Vertex RGBA_Vertex; - -struct _RGBA_Edge -{ - float x, dx; - int i; -}; - -struct _RGBA_Vertex -{ - float x, y; - int i; -}; - -#define POLY_EDGE_DEL(_i) \ -{ \ - int _j; \ - \ - for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ - if (_j < num_active_edges) \ - { \ - num_active_edges--; \ - memmove(&(edges[_j]), &(edges[_j + 1]), \ - (num_active_edges - _j) * sizeof(RGBA_Edge)); \ - } \ -} - -#define POLY_EDGE_ADD(_i, _y) \ -{ \ - int _j; \ - float _dx; \ - RGBA_Vertex *_p, *_q; \ - if (_i < (n - 1)) _j = _i + 1; \ - else _j = 0; \ - if (point[_i].y < point[_j].y) \ - { \ - _p = &(point[_i]); \ - _q = &(point[_j]); \ - } \ - else \ - { \ - _p = &(point[_j]); \ - _q = &(point[_i]); \ - } \ - edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ - edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ - edges[num_active_edges].i = _i; \ - num_active_edges++; \ -} - -static int -polygon_point_sorter(const void *a, const void *b) -{ - RGBA_Vertex *p, *q; - - p = (RGBA_Vertex *)a; - q = (RGBA_Vertex *)b; - if (p->y <= q->y) return -1; - return 1; -} - -static int -polygon_edge_sorter(const void *a, const void *b) -{ - RGBA_Edge *p, *q; - - p = (RGBA_Edge *)a; - q = (RGBA_Edge *)b; - if (p->x <= q->x) return -1; - return 1; -} - -void -evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) -{ - RGBA_Polygon_Point *pt; - RGBA_Vertex *point; - RGBA_Edge *edges; - int num_active_edges; - int n; - int i, j, k; - int y0, y1, yi; - int ext_x, ext_y, ext_w, ext_h; - int *sorted_index; - DATA8 alpha; - DATA16 rgb565; - DATA32 rgb565_unpack; - - alpha = A_VAL(&dc->col.col) >> 3; - if (alpha == 0) - return; - alpha++; - - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - rgb565_unpack = RGB_565_UNPACK(rgb565); - - ext_x = 0; - ext_y = 0; - ext_w = dst->cache_entry.w; - ext_h = dst->cache_entry.h; - if (dc->clip.use) - RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, - dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - - if ((ext_w <= 0) || (ext_h <= 0)) - return; - - n = 0; - EINA_INLIST_FOREACH(points, pt) n++; - - if (n < 3) - return; - - edges = malloc(sizeof(RGBA_Edge) * n); - if (!edges) - return; - - point = malloc(sizeof(RGBA_Vertex) * n); - if (!point) - { - free(edges); - return; - } - - sorted_index = malloc(sizeof(int) * n); - if (!sorted_index) - { - free(edges); - free(point); - return; - } - - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); - - for (k = 0; k < n; k++) - sorted_index[k] = point[k].i; - - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - - y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); - y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); - - k = 0; - num_active_edges = 0; - - for (yi = y0; yi <= y1; yi++) - { - for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) - { - i = sorted_index[k]; - - if (i > 0) j = i - 1; - else j = n - 1; - if (point[j].y <= ((float)yi - 0.5)) - { - POLY_EDGE_DEL(j) - } - else if (point[j].y > ((float)yi + 0.5)) - { - POLY_EDGE_ADD(j, yi) - } - if (i < (n - 1)) j = i + 1; - else j = 0; - if (point[j].y <= ((float)yi - 0.5)) - { - POLY_EDGE_DEL(i) - } - else if (point[j].y > ((float)yi + 0.5)) - { - POLY_EDGE_ADD(i, yi) - } - } - - qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); - - for (j = 0; j < num_active_edges; j += 2) - { - int x0, x1; - - x0 = ceil(edges[j].x - 0.5); - if (j < (num_active_edges - 1)) - x1 = floor(edges[j + 1].x - 0.5); - else - x1 = x0; - if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) - { - DATA16 *dst_itr; - int w; - - if (x0 < ext_x) x0 = ext_x; - if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; - - w = (x1 - x0) + 1; - dst_itr = dst->pixels + (yi * dst->stride) + x0; - - if (alpha == 32) - _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); - else - _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); - } - edges[j].x += edges[j].dx; - edges[j + 1].x += edges[j + 1].dx; - } - } - - free(edges); - free(point); - free(sorted_index); -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c deleted file mode 100644 index bd38fce..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c +++ /dev/null @@ -1,121 +0,0 @@ -#include "evas_common_soft16.h" -#include "evas_soft16_scanline_fill.c" - -static inline int -_is_empty_rectangle(const Eina_Rectangle *r) -{ - return (r->w < 1) || (r->h < 1); -} - -static inline void -_soft16_rectangle_draw_solid_solid(Soft16_Image *dst, int offset, int w, int h, - DATA16 rgb565) -{ - DATA16 *dst_itr; - int i; - - dst_itr = dst->pixels + offset; - - for (i = 0; i < h; i++, dst_itr += dst->stride) - _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); -} - -static inline void -_soft16_rectangle_draw_transp_solid(Soft16_Image *dst, int offset, int w, int h, - DATA16 rgb565, DATA8 alpha) -{ - DATA16 *dst_itr; - DATA32 rgb565_unpack; - int i; - - dst_itr = dst->pixels + offset; - rgb565_unpack = RGB_565_UNPACK(rgb565); - alpha++; - - for (i = 0; i < h; i++, dst_itr += dst->stride) - _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); -} - -static void -_soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc, - Eina_Rectangle dr) -{ - int dst_offset; - - if (_is_empty_rectangle(&dr)) return; - RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - if (_is_empty_rectangle(&dr)) return; - - if (dc->clip.use) - RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, - dc->clip.y, dc->clip.w, dc->clip.h); - if (_is_empty_rectangle(&dr)) return; - if (A_VAL(&dc->col.col) == 0) return; - - dst_offset = dr.x + (dr.y * dst->cache_entry.w); - - if (!dst->cache_entry.flags.alpha) - { - DATA16 rgb565; - DATA8 alpha; - - alpha = A_VAL(&dc->col.col) >> 3; - rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), - G_VAL(&dc->col.col), - B_VAL(&dc->col.col)); - if (alpha == 31) - _soft16_rectangle_draw_solid_solid - (dst, dst_offset, dr.w, dr.h, rgb565); - else if (alpha > 0) - _soft16_rectangle_draw_transp_solid - (dst, dst_offset, dr.w, dr.h, rgb565, alpha); - } - else - ERR("Unsupported feature: drawing rectangle to non-opaque destination."); -} - -void -evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, - int x, int y, int w, int h) -{ - Eina_Rectangle dr; - Cutout_Rects *rects; - Cutout_Rect *r; - struct RGBA_Draw_Context_clip c_bkp; - int i; - - /* handle cutouts here! */ - EINA_RECTANGLE_SET(&dr, x, y, w, h); - - if (_is_empty_rectangle(&dr)) return; - if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - _soft16_rectangle_draw_int(dst, dc, dr); - return; - } - - c_bkp = dc->clip; - - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, x, y, w, h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip = c_bkp; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - _soft16_rectangle_draw_int(dst, dc, dr); - } - evas_common_draw_context_apply_clear_cutouts(rects); - dc->clip = c_bkp; -} - diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c deleted file mode 100644 index c89eeaa..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c +++ /dev/null @@ -1,353 +0,0 @@ -/** NOTE: This file is meant to be included by users **/ - -/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. - ** this is due our division by 256 when multiplying the color. - **/ - -/***************************************************************************** - * Scanline processing - * - * _soft16_scanline___[_]() - * - ****************************************************************************/ - -#include "evas_soft16_point_blend.c" - -/*********************************************************************** - * Regular blend operations - */ -static void -_soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - /* work on 8 pixels per time, do data preload */ - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - /* empirical tests show these give the best performance */ - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft16_pt_blend_transp_solid(start - 8, src[-8], alpha1); - - alpha1 = alpha[-6]; - _soft16_pt_blend_transp_solid(start - 7, src[-7], alpha2); - - alpha2 = alpha[-5]; - _soft16_pt_blend_transp_solid(start - 6, src[-6], alpha1); - - alpha1 = alpha[-4]; - _soft16_pt_blend_transp_solid(start - 5, src[-5], alpha2); - - alpha2 = alpha[-3]; - _soft16_pt_blend_transp_solid(start - 4, src[-4], alpha1); - - alpha1 = alpha[-2]; - _soft16_pt_blend_transp_solid(start - 3, src[-3], alpha2); - - alpha2 = alpha[-1]; - _soft16_pt_blend_transp_solid(start - 2, src[-2], alpha1); - - _soft16_pt_blend_transp_solid(start - 1, src[-1], alpha2); - } - - /* remaining pixels (up to 7) */ - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft16_pt_blend_transp_solid(start, *src, *alpha); -} - -static inline void -_soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size) -{ - memcpy(dst, src, size * sizeof(DATA16)); -} - -/*********************************************************************** - * Blend operations taking an extra alpha (fade in, out) - */ - -static void -_soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 8, src[-8], alpha1, rel_alpha); - - alpha1 = alpha[-6]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 7, src[-7], alpha2, rel_alpha); - - alpha2 = alpha[-5]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 6, src[-6], alpha1, rel_alpha); - - alpha1 = alpha[-4]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 5, src[-5], alpha2, rel_alpha); - - alpha2 = alpha[-3]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 4, src[-4], alpha1, rel_alpha); - - alpha1 = alpha[-2]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 3, src[-3], alpha2, rel_alpha); - - alpha2 = alpha[-1]; - _soft16_pt_blend_transp_solid_mul_alpha - (start - 2, src[-2], alpha1, rel_alpha); - - _soft16_pt_blend_transp_solid_mul_alpha - (start - 1, src[-1], alpha2, rel_alpha); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); -} - -static void -_soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); - start++; - src++; - }); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); -} - -/*********************************************************************** - * Blend operations with extra alpha and multiply color - */ - -static void -_soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(src, 32); - pld(start, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 8, src[-8], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-6]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 7, src[-7], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-5]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 6, src[-6], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-4]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 5, src[-5], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-3]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 4, src[-4], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-2]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 3, src[-3], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-1]; - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 2, src[-2], alpha1, rel_alpha, r, g, b); - - _soft16_pt_blend_transp_solid_mul_color_transp - (start - 1, src[-1], alpha2, rel_alpha, r, g, b); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft16_pt_blend_transp_solid_mul_color_transp - (start, *src, *alpha, rel_alpha, r, g, b); -} - -static void -_soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_color_transp - (start, *src, rel_alpha, r, g, b); - start++; - src++; - }); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft16_pt_blend_solid_solid_mul_color_transp - (start, *src, rel_alpha, r, g, b); -} - -/*********************************************************************** - * Blend operations with extra multiply color - */ - -static void -_soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 8, src[-8], alpha1, r, g, b); - - alpha1 = alpha[-6]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 7, src[-7], alpha2, r, g, b); - - alpha2 = alpha[-5]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 6, src[-6], alpha1, r, g, b); - - alpha1 = alpha[-4]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 5, src[-5], alpha2, r, g, b); - - alpha2 = alpha[-3]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 4, src[-4], alpha1, r, g, b); - - alpha1 = alpha[-2]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 3, src[-3], alpha2, r, g, b); - - alpha2 = alpha[-1]; - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 2, src[-2], alpha1, r, g, b); - - _soft16_pt_blend_transp_solid_mul_color_solid - (start - 1, src[-1], alpha2, r, g, b); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft16_pt_blend_transp_solid_mul_color_solid - (start, *src, *alpha, r, g, b); -} - -static void -_soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b) -{ - DATA16 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8({ - _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); - start++; - src++; - }); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); -} diff --git a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c b/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c deleted file mode 100644 index d31bef8..0000000 --- a/libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c +++ /dev/null @@ -1,86 +0,0 @@ -/** NOTE: This file is meant to be included by users **/ - -/***************************************************************************** - * Point processing - * - * _soft16_pt___[_]() - * - * Scanline processing - * - * _soft16_scanline___[_]() - * - ****************************************************************************/ -EFL_ALWAYS_INLINE void -_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565) -{ - *dst = rgb565; -} - -static void -_soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565) -{ - DATA16 *start, *end; - DATA32 rgb565_double; - - start = dst; - - if ((long)start & 0x2) - { - *start = rgb565; - start++; - size--; - } - - end = start + (size & ~7); - - rgb565_double = (rgb565 << 16) | rgb565; - - while (start < end) - { - DATA32 *p = (DATA32 *)start; - - p[0] = rgb565_double; - p[1] = rgb565_double; - p[2] = rgb565_double; - p[3] = rgb565_double; - - start += 8; - } - - end = start + (size & 7); - for (; start < end; start++) - *start = rgb565; -} - -EFL_ALWAYS_INLINE void -_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha) -{ - DATA32 d; - - d = RGB_565_UNPACK(*dst); - d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha); - *dst = RGB_565_PACK(d); -} - -static void -_soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 rgb565_unpack, DATA8 alpha) -{ - DATA16 *start, *end; - - start = dst; - pld(start, 0); - end = start + (size & ~7); - - while (start < end) - { - pld(start, 32); - UNROLL8({ - _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); - start++; - }); - } - - end = start + (size & 7); - for (; start < end; start++) - _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); -} diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.am b/libraries/evas/src/lib/engines/common_8/Makefile.am deleted file mode 100644 index 58a1b1f..0000000 --- a/libraries/evas/src/lib/engines/common_8/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@VALGRIND_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EET_CFLAGS@ \ -@pthread_cflags@ - -noinst_LTLIBRARIES = libevas_engine_common_8.la - -libevas_engine_common_8_la_SOURCES = \ -evas_soft8_dither_mask.c \ -evas_soft8_font.c \ -evas_soft8_image_unscaled.c \ -evas_soft8_main.c \ -evas_soft8_rectangle.c \ -evas_soft8_line.c \ -evas_soft8_polygon.c \ -evas_soft8_image_scaled_sampled.c - - -libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h - -EXTRA_DIST = \ -evas_soft8_scanline_blend.c \ -evas_soft8_scanline_fill.c diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.in b/libraries/evas/src/lib/engines/common_8/Makefile.in deleted file mode 100644 index 11b2454..0000000 --- a/libraries/evas/src/lib/engines/common_8/Makefile.in +++ /dev/null @@ -1,700 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/engines/common_8 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_engine_common_8_la_LIBADD = -am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \ - evas_soft8_font.lo evas_soft8_image_unscaled.lo \ - evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \ - evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo -libevas_engine_common_8_la_OBJECTS = \ - $(am_libevas_engine_common_8_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_engine_common_8_la_SOURCES) -DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@VALGRIND_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EET_CFLAGS@ \ -@pthread_cflags@ - -noinst_LTLIBRARIES = libevas_engine_common_8.la -libevas_engine_common_8_la_SOURCES = \ -evas_soft8_dither_mask.c \ -evas_soft8_font.c \ -evas_soft8_image_unscaled.c \ -evas_soft8_main.c \ -evas_soft8_rectangle.c \ -evas_soft8_line.c \ -evas_soft8_polygon.c \ -evas_soft8_image_scaled_sampled.c - -libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h -EXTRA_DIST = \ -evas_soft8_scanline_blend.c \ -evas_soft8_scanline_fill.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c deleted file mode 100644 index c1f3c14..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c +++ /dev/null @@ -1,100 +0,0 @@ -#include "evas_common_soft8.h" - -EFL_ALWAYS_INLINE void -_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha) -{ - if (A_VAL(src) == 0) - { - *dst = 0; - *alpha = 0; - } - else - { - *dst = GRY_8_FROM_RGB(src); - *alpha = A_VAL(src); - } -} - -static inline void -_soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst, - DATA8 * alpha, const int w) -{ - int x, m; - - m = (w & ~7); - x = 0; - pld(src, 0); - - while (x < m) - { - pld(src, 32); - UNROLL8( - { - _soft8_convert_from_rgba_pt(src, dst, alpha); - src++; dst++; alpha++; x++;} - ); - } - - for (; x < w; x++, src++, dst++, alpha++) - _soft8_convert_from_rgba_pt(src, dst, alpha); -} - -void -evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src) -{ - const DATA32 *sp; - DATA8 *dp; - DATA8 *ap; - unsigned int y; - - sp = src; - dp = im->pixels; - ap = im->alpha; - - for (y = 0; y < im->cache_entry.h; - y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) - _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w); -} - -EFL_ALWAYS_INLINE void -_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst) -{ - *dst = GRY_8_FROM_RGB(src); -} - -static inline void -_soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w) -{ - int x, m; - - m = (w & ~7); - x = 0; - pld(src, 0); - - while (x < m) - { - pld(src, 32); - UNROLL8( - { - _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;} - ); - } - - for (; x < w; x++, src++, dst++) - _soft8_convert_from_rgb_pt(src, dst); -} - -void -evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src) -{ - const DATA32 *sp; - DATA8 *dp; - unsigned int y; - - sp = src; - dp = im->pixels; - - for (y = 0; y < im->cache_entry.h; - y++, sp += im->cache_entry.w, dp += im->stride) - _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w); -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c deleted file mode 100644 index 8f69b86..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_font.c +++ /dev/null @@ -1,285 +0,0 @@ -#include "evas_common_soft8.h" -#include "evas_soft8_scanline_blend.c" - -EFL_ALWAYS_INLINE void -_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask) -{ - DATA8 alpha = *mask; - - if (alpha == 0xff) - *dst = gry8; - else if (alpha > 0) - { - *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha); - } -} - -static void -_glyph_scanline_mask_solid_solid(DATA8 * dst, - int size, const DATA8 gry8, const DATA8 * mask) -{ - DATA8 *start, *end; - - start = dst; - pld(start, 0); - pld(mask, 0); - end = start + (size & ~3); - - while (start < end) - { - pld(start, 8); - pld(mask, 4); - UNROLL4( - { - _glyph_pt_mask_solid_solid(start, gry8, mask); - start++; mask++;} - ); - } - - end = start + (size & 3); - for (; start < end; start++, mask++) - _glyph_pt_mask_solid_solid(start, gry8, mask); -} - -EFL_ALWAYS_INLINE void -_glyph_pt_mask_transp_solid(DATA8 * dst, - DATA8 gry8, DATA8 alpha, const DATA8 * mask) -{ - int rel_alpha; - - rel_alpha = *mask; - alpha = (alpha * rel_alpha) >> 8; - if (alpha == 0) - return; - - alpha++; - - *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha); -} - -static void -_glyph_scanline_mask_transp_solid(DATA8 * dst, - int size, - const DATA8 gry8, - const DATA8 rel_alpha, const DATA8 * mask) -{ - DATA8 *start, *end; - - start = dst; - pld(start, 0); - pld(mask, 0); - end = start + (size & ~3); - - while (start < end) - { - pld(start, 8); - pld(mask, 4); - UNROLL4( - { - _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); - start++; mask++;} - ); - } - - end = start + (size & 3); - for (; start < end; start++, mask++) - _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); -} - -static inline void -_calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc, - Eina_Rectangle * ext) -{ - EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); - - if (dc->clip.use) - { - int v; - - EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - if (ext->x < 0) - { - ext->w += ext->x; - ext->x = 0; - } - if (ext->y < 0) - { - ext->h += ext->y; - ext->y = 0; - } - - v = dst->cache_entry.w - ext->x; - if (ext->w > v) - ext->w = v; - - v = dst->cache_entry.h - ext->y; - if (ext->h > v) - ext->h = v; - } -} - -static inline void -_glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask, - const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, - int w, DATA8 alpha, const DATA8 gry8) -{ - int size, in_x, in_w; - DATA8 *p_pixels; - - if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) - return; - - in_x = 0; - in_w = 0; - - if (dx + w > max_x) - in_w += (dx + w) - max_x; - - if (dx < ext.x) - { - in_w += ext.x - dx; - in_x = ext.x - dx; - dx = ext.x; - } - - size = w - in_w; - p_pixels = dst->pixels + (dy * dst->stride) + dx; - p_mask += in_x; - - if (size > 1) - { - if (alpha == 0xff) - _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask); - else if (alpha != 0) - _glyph_scanline_mask_transp_solid - (p_pixels, size, gry8, alpha, p_mask); - } - else if (size == 1) - { - if (alpha == 0xff) - _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask); - else if (alpha != 0) - _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask); - } -} - -static void -_soft8_font_glyph_draw_grayscale(Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - RGBA_Font_Glyph * fg __UNUSED__, int x, int y, - DATA8 alpha, DATA8 gry8, - const Eina_Rectangle ext, int bw, int bh, - int bpitch, const DATA8 * bitmap) -{ - int i, max_x, max_y; - - max_x = ext.x + ext.w; - max_y = ext.y + ext.h; - - for (i = 0; i < bh; i++, bitmap += bpitch) - _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, - alpha, gry8); -} - -static inline void -_glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w) -{ - const DATA8 bitrepl[2] = { 0x0, 0xff }; - int i; - - for (i = 0; i < w; i += 8, bitmap++) - { - int j, size; - DATA32 bits; - - if (i + 8 < w) - size = 8; - else - size = w - i; - - bits = *bitmap; - - for (j = size - 1; j >= 0; j--, mask++) - *mask = bitrepl[(bits >> j) & 0x1]; - } -} - -static void -_soft8_font_glyph_draw_mono(Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - RGBA_Font_Glyph * fg __UNUSED__, int x, int y, - DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext, - int bw, int bh, int bpitch, const DATA8 * bitmap) -{ - DATA8 *mask; - int i, max_x, max_y; - - max_x = ext.x + ext.w; - max_y = ext.y + ext.h; - - mask = alloca(bpitch); - for (i = 0; i < bh; i++, bitmap += bpitch) - { - _glyph_create_mask_line(mask, bitmap, bw); - _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, - alpha, gry8); - } -} - -void -evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, - RGBA_Font_Glyph * fg, int x, int y) -{ - Soft8_Image *dst; - RGBA_Draw_Context *dc; - const DATA8 *bitmap; - DATA8 alpha; // r, g, b - DATA8 gry8; - Eina_Rectangle ext; - int bpitch, bw, bh; - - dst = data; - dc = context; - - alpha = A_VAL(&dc->col.col); - if (alpha == 0) - return; - - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - /* - * if (r > alpha) r = alpha; - * if (g > alpha) g = alpha; - * if (b > alpha) b = alpha; - * - * gry8 = GRY_8_FROM_COMPONENTS(r, g, b); - */ - - bitmap = fg->glyph_out->bitmap.buffer; - bh = fg->glyph_out->bitmap.rows; - bw = fg->glyph_out->bitmap.width; - bpitch = fg->glyph_out->bitmap.pitch; - if (bpitch < bw) - bpitch = bw; - - _calc_ext(dst, dc, &ext); - - if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) - _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8, - ext, bw, bh, bpitch, bitmap); - else - _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8, - ext, bw, bh, bpitch, bitmap); -} - -void * -evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__) -{ - return (void *)1; /* core requires != NULL to work */ -} - -void -evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__) -{ -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c deleted file mode 100644 index 7344263..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c +++ /dev/null @@ -1,463 +0,0 @@ -#include "evas_common_soft8.h" -#include "evas_soft8_scanline_blend.c" - -static void -_soft8_image_draw_scaled_solid_solid(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8( - { - _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;} - ); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); - } -} -static void -_soft8_image_draw_scaled_transp_solid(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8( - { - int off_x = offset_x[x]; - _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]); - x++; d++;}); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); - } -} - -static inline void -_soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_scaled_transp_solid - (src, dst, dc, dst_offset, w, h, offset_x, offset_y); - else if (!dst->cache_entry.flags.alpha) - _soft8_image_draw_scaled_solid_solid - (src, dst, dc, dst_offset, w, h, offset_x, offset_y); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); -} - -static void -_soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int dst_offset, - int w, int h, int *offset_x, - int *offset_y, DATA8 alpha) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_alpha - (d, s[offset_x[x]], alpha); x++; d++;} - ); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha); - } -} - -static void -_soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int dst_offset, - int w, int h, int *offset_x, - int *offset_y, DATA8 alpha) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8( - { - int off_x = offset_x[x]; - _soft8_pt_blend_transp_solid_mul_alpha - (d, s[off_x], a[off_x], alpha); x++; d++;}); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_transp_solid_mul_alpha - (d, s[offset_x[x]], a[offset_x[x]], alpha); - } -} - -static inline void -_soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, DATA8 a) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_scaled_transp_solid_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else if (!dst->cache_entry.flags.alpha) - _soft8_image_draw_scaled_solid_solid_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, - A_VAL(&dc->mul.col)); -} - -static void -_soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int dst_offset, - int w, int h, int *offset_x, - int *offset_y, DATA8 r, DATA8 g, - DATA8 b, DATA8 alpha) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - - if (alpha == 0xff) - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_color_solid - (d, s[offset_x[x]], r, g, b); x++; d++;} - ); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_solid_solid_mul_color_solid - (d, s[offset_x[x]], r, g, b); - } - else - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - int x; - - s = src->pixels + offset_y[y]; - pld(s, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(offset_x + x, 32); - - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_color_transp - (d, s[offset_x[x]], alpha, r, g, b); x++; d++;} - ); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_solid_solid_mul_color_transp - (d, s[offset_x[x]], alpha, r, g, b); - } -} - -static void -_soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int dst_offset, - int w, int h, int *offset_x, - int *offset_y, DATA8 r, DATA8 g, - DATA8 b, DATA8 alpha) -{ - DATA8 *dst_itr; - int y, w_align; - - w_align = w & ~7; - - dst_itr = dst->pixels + dst_offset; - - if (alpha == 0xff) - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8( - { - int off_x = offset_x[x]; - _soft8_pt_blend_transp_solid_mul_color_solid - (d, s[off_x], a[off_x], r, g, b); x++; d++;}); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_transp_solid_mul_color_solid - (d, s[offset_x[x]], a[offset_x[x]], r, g, b); - } - else - for (y = 0; y < h; y++, dst_itr += dst->stride) - { - DATA8 *d, *s; - DATA8 *a; - int x; - - s = src->pixels + offset_y[y]; - a = src->alpha + offset_y[y]; - pld(s, 0); - pld(a, 0); - pld(offset_x, 0); - - d = dst_itr; - x = 0; - while (x < w_align) - { - pld(s, 32); - pld(a, 8); - pld(offset_x + x, 32); - - UNROLL8( - { - int off_x = offset_x[x]; - _soft8_pt_blend_transp_solid_mul_color_transp - (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;}); - } - - for (; x < w; x++, d++) - _soft8_pt_blend_transp_solid_mul_color_transp - (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); - } -} - -static inline void -_soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, - DATA8 r, DATA8 g, DATA8 b, DATA8 a) -{ - if ((src->cache_entry.flags.alpha && src->alpha) && - (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_scaled_transp_solid_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); - else if (!dst->cache_entry.flags.alpha) - _soft8_image_draw_scaled_solid_solid_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); - else - ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, - dc->mul.col); -} - -static inline void -_soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int dst_offset, int w, int h, - int *offset_x, int *offset_y, DATA8 r, DATA8 g, - DATA8 b, DATA8 a) -{ - if ((a == r) && (a == g) && (a == b)) - _soft8_image_draw_scaled_mul_alpha - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); - else - _soft8_image_draw_scaled_mul_color - (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); -} - -void -evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - const Eina_Rectangle sr, - const Eina_Rectangle dr, - const Eina_Rectangle cr) -{ - int x, y, dst_offset, *offset_x, *offset_y; - DATA8 mul_gry8; - DATA8 r, g, b, a; - - if (!dc->mul.use) - { - r = g = b = a = 0xff; - mul_gry8 = 0xff; - } - else - { - a = A_VAL(&dc->mul.col); - if (a == 0) - return; - - r = R_VAL(&dc->mul.col); - g = G_VAL(&dc->mul.col); - b = B_VAL(&dc->mul.col); - - if (r > a) - r = a; - if (g > a) - g = a; - if (b > a) - b = a; - - mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); - } - - /* pre-calculated scale tables */ - offset_x = alloca(cr.w * sizeof(*offset_x)); - for (x = 0; x < cr.w; x++) - offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; - - offset_y = alloca(cr.h * sizeof(*offset_y)); - for (y = 0; y < cr.h; y++) - offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) - * src->stride); - - dst_offset = cr.x + (cr.y * dst->stride); - - if (mul_gry8 == 0xff) - _soft8_image_draw_scaled_no_mul - (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); - else - _soft8_image_draw_scaled_mul - (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, - a); -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c deleted file mode 100644 index 6f4e76b..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c +++ /dev/null @@ -1,284 +0,0 @@ -#include "evas_common_soft8.h" -#include "evas_soft8_scanline_blend.c" - -static void -_soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - int src_offset, int dst_offset, - int w, int h) -{ - DATA8 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc __UNUSED__, - int src_offset, int dst_offset, - int w, int h) -{ - DATA8 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int src_offset, int dst_offset, - int width, int height) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_transp_solid(src, dst, dc, - src_offset, dst_offset, - width, height); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_solid_solid(src, dst, dc, - src_offset, dst_offset, - width, height); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); -} - -static void -_soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int src_offset, - int dst_offset, int w, int h, - DATA8 a) -{ - DATA8 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int src_offset, - int dst_offset, int w, int h, - DATA8 a) -{ - DATA8 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, - dst_itr, w, a); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int src_offset, int dst_offset, - int width, int height, DATA8 a) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_transp_solid_mul_alpha - (src, dst, dc, src_offset, dst_offset, width, height, a); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_solid_solid_mul_alpha - (src, dst, dc, src_offset, dst_offset, width, height, a); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); -} - -static void -_soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int src_offset, - int dst_offset, int w, int h, - DATA8 r, DATA8 g, DATA8 b, - DATA8 a) -{ - DATA8 *src_itr, *dst_itr; - int y; - - src_itr = src->pixels + src_offset; - dst_itr = dst->pixels + dst_offset; - - if (a == 0xff) - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_solid_solid_mul_color_solid - (src_itr, dst_itr, w, r, g, b); - src_itr += src->stride; - dst_itr += dst->stride; - } - else - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_solid_solid_mul_color_transp - (src_itr, dst_itr, w, a, r, g, b); - src_itr += src->stride; - dst_itr += dst->stride; - } -} - -static void -_soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src, - Soft8_Image * dst, - RGBA_Draw_Context * - dc __UNUSED__, int src_offset, - int dst_offset, int w, int h, - DATA8 r, DATA8 g, DATA8 b, - DATA8 a) -{ - DATA8 *src_itr, *dst_itr; - DATA8 *alpha_itr; - int y; - - src_itr = src->pixels + src_offset; - alpha_itr = src->alpha + src_offset; - dst_itr = dst->pixels + dst_offset; - - if (a == 0xff) - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_transp_solid_mul_color_solid - (src_itr, alpha_itr, dst_itr, w, r, g, b); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } - else - for (y = 0; y < h; y++) - { - _soft8_scanline_blend_transp_solid_mul_color_transp - (src_itr, alpha_itr, dst_itr, w, a, r, g, b); - src_itr += src->stride; - alpha_itr += src->stride; - dst_itr += dst->stride; - } -} - -static inline void -_soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int src_offset, int dst_offset, - int width, int height, - DATA8 r, DATA8 g, DATA8 b, DATA8 a) -{ - if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_transp_solid_mul_color - (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); - else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) - _soft8_image_draw_unscaled_solid_solid_mul_color - (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); - else - ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " - "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", - src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); -} - -static inline void -_soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - int src_offset, int dst_offset, - int width, int height, DATA8 r, DATA8 g, - DATA8 b, DATA8 a) -{ - if ((a == r) && (a == g) && (a == b)) - _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, - dst_offset, width, height, a); - else - _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset, - dst_offset, width, height, - r, g, b, a); -} - -void -evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - const Eina_Rectangle sr, - const Eina_Rectangle dr, const Eina_Rectangle cr) -{ - int src_offset_rows, src_offset, dst_offset; - DATA8 mul_gry8; - DATA8 r, g, b, a; - - if (!dc->mul.use) - { - r = g = b = a = 0xff; - mul_gry8 = 0xff; - } - else - { - a = A_VAL(&dc->mul.col); - if (a == 0) - return; - - r = R_VAL(&dc->mul.col); - g = G_VAL(&dc->mul.col); - b = B_VAL(&dc->mul.col); - - if (r > a) - r = a; - if (g > a) - g = a; - if (b > a) - b = a; - - mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); - } - - src_offset_rows = (cr.y - dr.y) + sr.y; - src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; - - dst_offset = cr.x + (cr.y * dst->stride); - - if (mul_gry8 == 0xff) - _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, - cr.w, cr.h); - else - _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, - cr.w, cr.h, r, g, b, a); -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c deleted file mode 100644 index 6ec2d22..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_line.c +++ /dev/null @@ -1,426 +0,0 @@ -#include "evas_common_soft8.h" -#include "evas_soft8_scanline_fill.c" - -/* - * All functions except by evas_common_soft8_line_draw() expect x0 <= x1. - */ - -static inline int -_in_range(int value, int min, int max) -{ - return min <= value && value <= max; -} - -static inline int -_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - if (!_in_range(x, clip.x, clip.x + clip.w - 1)) - return 0; - - if (!_in_range(y, clip.y, clip.y + clip.h - 1)) - return 0; - - return 1; -} - -static inline int -_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - return _in_range(x, clip.x, clip.x + clip.w - 1); -} - -static inline int -_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) -{ - if (!clip.use) - return 1; - - return _in_range(y, clip.y, clip.y + clip.h - 1); -} - -static inline int -_is_xy_inside_rect(int x, int y, int w, int h) -{ - return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); -} - -static inline int -_is_empty_clip(const struct RGBA_Draw_Context_clip clip) -{ - return clip.w < 1 || clip.h < 1; -} - -static void -_soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y) -{ - DATA8 gry8, *dst_itr; - DATA8 alpha; - - if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) - return; - - if (!_is_xy_inside_clip(x, y, dc->clip)) - return; - - dst_itr = dst->pixels + (dst->stride * y) + x; - alpha = A_VAL(&dc->col.col); - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - if (alpha == 0xff) - _soft8_pt_fill_solid_solid(dst_itr, gry8); - else if (alpha > 0) - { - alpha++; - _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); - } -} - -static void -_soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1, - int y) -{ - DATA8 gry8, *dst_itr; - DATA8 alpha; - int w; - - if (!_is_y_inside_clip(y, dc->clip)) - return; - - if (x0 < dc->clip.x) - x0 = dc->clip.x; - - if (x1 >= dc->clip.x + dc->clip.w) - x1 = dc->clip.x + dc->clip.w - 1; - - w = x1 - x0; - if (w < 1) - return; - - dst_itr = dst->pixels + (dst->stride * y) + x0; - alpha = A_VAL(&dc->col.col); - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - if (alpha == 0xff) - _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); - else if (alpha > 0) - { - alpha++; - _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); - } -} - -static void -_soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0, - int y1) -{ - DATA8 gry8, *dst_itr; - DATA8 alpha; - int h; - - if (!_is_x_inside_clip(x, dc->clip)) - return; - - if (y1 < y0) - { - int t; - t = y0; - y0 = y1; - y1 = t; - } - - if (y0 < dc->clip.y) - y0 = dc->clip.y; - - if (y1 >= dc->clip.y + dc->clip.h) - y1 = dc->clip.y + dc->clip.h - 1; - - h = y1 - y0; - if (h < 1) - return; - - dst_itr = dst->pixels + (dst->stride * y0) + x; - alpha = A_VAL(&dc->col.col); - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - if (alpha == 0xff) - { - for (; h > 0; h--, dst_itr += dst->stride) - _soft8_pt_fill_solid_solid(dst_itr, gry8); - } - else if (alpha > 0) - { - alpha++; - - for (; h > 0; h--, dst_itr += dst->stride) - _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); - } -} - -static inline void -_soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, - int *p_x0, int *p_y0, int *p_x1, int *p_y1) -{ - int diff, dy, x0, y0, x1, y1; - - x0 = *p_x0; - y0 = *p_y0; - x1 = *p_x1; - y1 = *p_y1; - - dy = y1 - y0; - - diff = clip.x - x0; - if (diff > 0) - { - x0 = clip.x; - y0 += (dy > 0) ? diff : -diff; - } - - diff = x1 - (clip.x + clip.w); - if (diff > 0) - { - x1 = clip.x + clip.w; - y1 += (dy > 0) ? -diff : diff; - } - - if (dy > 0) - { - diff = clip.y - y0; - if (diff > 0) - { - y0 = clip.y; - x0 += diff; - } - - diff = y1 - (clip.y + clip.h); - if (diff > 0) - { - y1 = clip.y + clip.h; - x1 -= diff; - } - } - else - { - diff = clip.y - y1; - if (diff > 0) - { - y1 = clip.y; - x1 -= diff; - } - - diff = y0 - (clip.y + clip.h - 1); - if (diff > 0) - { - y0 = clip.y + clip.h - 1; - x0 += diff; - } - } - - *p_x0 = x0; - *p_y0 = y0; - *p_x1 = x1; - *p_y1 = y1; -} - -static void -_soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, - int x1, int y1) -{ - int dy, step_dst_itr, len; - DATA8 alpha; - DATA8 *dst_itr, gry8; - - alpha = A_VAL(&dc->col.col); - if (alpha < 1) - return; - - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - dy = y1 - y0; - step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); - - _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); - - len = (dy > 0) ? (y1 - y0) : (y0 - y1); - if (len < 1) - return; - - dst_itr = dst->pixels + dst->stride * y0 + x0; - if (alpha == 0xff) - { - for (; len > 0; len--, dst_itr += step_dst_itr) - _soft8_pt_fill_solid_solid(dst_itr, gry8); - } - else - { - alpha++; - for (; len > 0; len--, dst_itr += step_dst_itr) - _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); - } -} - -EFL_ALWAYS_INLINE void -_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha) -{ - if (alpha == 32) - _soft8_pt_fill_solid_solid(dst_itr, gry8); - else - _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); -} - -static void -_soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, - int x1, int y1) -{ - int dx, dy, step_y, step_dst_itr; - DATA8 gry8; - DATA8 alpha; - - alpha = A_VAL(&dc->col.col); - if (alpha == 0) - return; - alpha++; - - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - dx = x1 - x0; - dy = y1 - y0; - - if (dy >= 0) - { - step_y = 1; - step_dst_itr = dst->stride; - } - else - { - dy = -dy; - step_y = -1; - step_dst_itr = -dst->stride; - } - - if (dx > dy) - { - DATA8 *dst_itr; - int e, x, y; - - e = -(dx / 2); - y = y0; - dst_itr = dst->pixels + dst->stride * y0 + x0; - for (x = x0; x <= x1; x++, dst_itr++) - { - if (_is_xy_inside_clip(x, y, dc->clip)) - _soft8_line_aliased_pt(dst_itr, gry8, alpha); - - e += dy; - if (e >= 0) - { - dst_itr += step_dst_itr; - y += step_y; - e -= dx; - } - } - } - else - { - DATA8 *dst_itr; - int e, x, y; - - e = -(dy / 2); - x = x0; - dst_itr = dst->pixels + dst->stride * y0 + x0; - for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr) - { - if (_is_xy_inside_clip(x, y, dc->clip)) - _soft8_line_aliased_pt(dst_itr, gry8, alpha); - - e += dx; - if (e >= 0) - { - dst_itr++; - x++; - e -= dy; - } - } - } -} - -void -evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, - int x1, int y1) -{ - struct RGBA_Draw_Context_clip c_bkp, c_tmp; - int dx, dy; - int x, y, w, h; - - c_tmp.use = 1; - c_tmp.x = 0; - c_tmp.y = 0; - c_tmp.w = dst->cache_entry.w; - c_tmp.h = dst->cache_entry.h; - - /* save out clip info */ - c_bkp = dc->clip; - if (c_bkp.use) - { - RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, - c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); - if (_is_empty_clip(c_tmp)) - return; - } - - x = MIN(x0, x1); - y = MIN(y0, y1); - w = MAX(x0, x1) - x + 1; - h = MAX(y0, y1) - y + 1; - - RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); - if (_is_empty_clip(c_tmp)) - return; - - /* Check if the line doesn't cross the clip area */ - if (x0 < c_tmp.x && x1 < c_tmp.x) - return; - if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) - return; - if (y0 < c_tmp.y && y1 < c_tmp.y) - return; - if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) - return; - - dc->clip = c_tmp; - dx = x1 - x0; - dy = y1 - y0; - - if (dx < 0) - { - int t; - - t = x0; - x0 = x1; - x1 = t; - - t = y0; - y0 = y1; - y1 = t; - } - - if (dx == 0 && dy == 0) - _soft8_line_point(dst, dc, x0, y0); - else if (dx == 0) - _soft8_line_vert(dst, dc, x0, y0, y1); - else if (dy == 0) - _soft8_line_horiz(dst, dc, x0, x1, y0); - else if (dy == dx || dy == -dx) - _soft8_line_45deg(dst, dc, x0, y0, x1, y1); - else - _soft8_line_aliased(dst, dc, x0, y0, x1, y1); - - /* restore clip info */ - dc->clip = c_bkp; -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c deleted file mode 100644 index cc4ce25..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_main.c +++ /dev/null @@ -1,656 +0,0 @@ -#include "evas_common_soft8.h" - -static Evas_Cache_Image *eci = NULL; -static int reference = 0; - -static Image_Entry *_evas_common_soft8_image_new(void); -static void _evas_common_soft8_image_delete(Image_Entry * ie); - -static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h); -static void _evas_common_soft8_image_surface_delete(Image_Entry * ie); -static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie); - -static int _evas_common_load_soft8_image_from_file(Image_Entry * ie); -static void _evas_common_soft8_image_unload(Image_Entry * ie); - -static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); -static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst, - const Image_Entry * ie_src); - -static int _evas_common_soft8_image_ram_usage(Image_Entry * ie); - -static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst, - const Image_Entry * ie_im, unsigned int w, unsigned int h); -static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); -static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); -static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst, - int cspace); - -static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie); - -/* -static void -_evas_common_soft8_image_debug(const char* context, Image_Entry *eim) -{ - DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); -} -*/ - -static const Evas_Cache_Image_Func _evas_common_soft8_image_func = { - _evas_common_soft8_image_new, - _evas_common_soft8_image_delete, - _evas_common_soft8_image_surface_alloc, - _evas_common_soft8_image_surface_delete, - _evas_common_soft8_image_surface_pixels, - _evas_common_load_soft8_image_from_file, - _evas_common_soft8_image_unload, - _evas_common_soft8_image_dirty_region, - _evas_common_soft8_image_dirty, - _evas_common_soft8_image_size_set, - _evas_common_soft8_image_from_copied_data, - _evas_common_soft8_image_from_data, - _evas_common_soft8_image_colorspace_set, - _evas_common_load_soft8_image_data_from_file, - _evas_common_soft8_image_ram_usage, -/* _evas_common_soft8_image_debug */ - NULL -}; - -EAPI void -evas_common_soft8_image_init(void) -{ - if (!eci) - eci = evas_cache_image_init(&_evas_common_soft8_image_func); - reference++; -} - -EAPI void -evas_common_soft8_image_shutdown(void) -{ - if (--reference == 0) - { -// DISABLE for now - something wrong with cache shutdown freeing things -// still in use - rage_thumb segv's now. -// -// actually - i think i see it. cache ref goes to 0 (and thus gets freed) -// because in eng_setup() when a buffer changes size it is FIRST freed -// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately -// where it should stay at 1. - see evas_engine.c in the buffer enigne for -// example. eng_output_free() is called BEFORE _output_setup(). although this -// is only a SIGNE of the problem. we can patch this up with either freeing -// after the setup (so we just pt a ref of 2 then back to 1), or just -// evas_common_image_init() at the start and evas_common_image_shutdown() -// after it all. really ref 0 should only be reached when no more canvases -// with no more objects exist anywhere. - -// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. - //evas_cache_image_shutdown(eci); - //eci = NULL; - } -} - -EAPI Evas_Cache_Image * -evas_common_soft8_image_cache_get(void) -{ - return eci; -} - -static Image_Entry * -_evas_common_soft8_image_new(void) -{ - Soft8_Image *im; - - im = calloc(1, sizeof(Soft8_Image)); - if (!im) - return NULL; - - im->stride = -1; - - return (Image_Entry *) im; -} - -static void -_evas_common_soft8_image_delete(Image_Entry * ie) -{ - memset(ie, 0xFF, sizeof(Soft8_Image)); - free(ie); -} - -static int -_evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h) -{ - Soft8_Image *im = (Soft8_Image *) ie; - - if (im->stride < 0) - im->stride = _calc_stride(w); - - im->pixels = - realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); - if (!im->pixels) - return -1; - - if (ie->flags.alpha) - { - im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); - im->flags.free_alpha = 0; - } - im->flags.free_pixels = 1; - - return 0; -} - -static void -_evas_common_soft8_image_surface_delete(Image_Entry * ie) -{ - Soft8_Image *im = (Soft8_Image *) ie; - - if (im->flags.free_pixels) - free(im->pixels); - im->pixels = NULL; - im->flags.free_pixels = 0; - - if (im->flags.free_alpha) - free(im->alpha); - im->alpha = NULL; - im->flags.free_alpha = 0; -} - -static DATA32 * -_evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__) -{ - abort(); - - return NULL; -} - -static int -_evas_common_load_soft8_image_from_file(Image_Entry * ie) -{ - Soft8_Image *sim = (Soft8_Image *) ie; - RGBA_Image *im; - int error = 0; - - im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), - sim->cache_entry.file, - sim->cache_entry.key, - &sim->cache_entry.load_opts, - &error); - sim->source = im; - if (!sim->source) - return -1; - - sim->cache_entry.w = sim->source->cache_entry.w; - sim->cache_entry.h = sim->source->cache_entry.h; - ie->flags.alpha = im->cache_entry.flags.alpha; - if (sim->stride < 0) - sim->stride = _calc_stride(sim->cache_entry.w); - - return 0; -} - -static void -_evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__) -{ -} - -static void -_evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__, - unsigned int x __UNUSED__, - unsigned int y __UNUSED__, - unsigned int w __UNUSED__, - unsigned int h __UNUSED__) -{ -} - -static int -_evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src) -{ - Soft8_Image *dst = (Soft8_Image *) ie_dst; - Soft8_Image *src = (Soft8_Image *) ie_src; - - evas_cache_image_load_data(&src->cache_entry); - evas_cache_image_surface_alloc(&dst->cache_entry, - src->cache_entry.w, src->cache_entry.h); - -/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ - - return 0; -} - -static int -_evas_common_soft8_image_ram_usage(Image_Entry * ie) -{ - Soft8_Image *im = (Soft8_Image *) ie; - - if (im->pixels && im->flags.free_pixels) - return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); - return 0; -} - -static int -_evas_common_soft8_image_size_set(Image_Entry * ie_dst, - const Image_Entry * ie_im, - unsigned int w __UNUSED__, - unsigned int h __UNUSED__) -{ - Soft8_Image *dst = (Soft8_Image *) ie_dst; - Soft8_Image *im = (Soft8_Image *) ie_im; - - dst->flags = im->flags; - - return 0; -} - -static int -_evas_common_soft8_image_from_data(Image_Entry * ie_dst, - unsigned int w, unsigned int h, - DATA32 * image_data, int alpha, - int cspace __UNUSED__) -{ - Soft8_Image *im = (Soft8_Image *) ie_dst; - - /* FIXME: handle colorspace */ - ie_dst->w = w; - ie_dst->h = h; - ie_dst->flags.alpha = alpha; - - im->flags.free_pixels = 0; - im->flags.free_alpha = 0; - if (im->stride < 0) - im->stride = _calc_stride(w); - - /* FIXME: That's bad, the application must be aware of the engine internal. */ - im->pixels = (DATA8 *) image_data; - if (ie_dst->flags.alpha) - im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); - - return 0; -} - -static int -_evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, - unsigned int w __UNUSED__, - unsigned int h, - DATA32 * image_data, - int alpha __UNUSED__, - int cspace __UNUSED__) -{ - Soft8_Image *im = (Soft8_Image *) ie_dst; - - /* FIXME: handle colorspace */ - if (image_data) - memcpy(im->pixels, image_data, - IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); - else - memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); - - return 0; -} - -static int -_evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__, - int cspace __UNUSED__) -{ - /* FIXME: handle colorspace */ - return 0; -} - -static int -_evas_common_load_soft8_image_data_from_file(Image_Entry * ie) -{ - Soft8_Image *im = (Soft8_Image *) ie; - - if (im->pixels) - return 0; - if (!im->source) - return -1; - - evas_cache_image_load_data(&im->source->cache_entry); - if (im->source->image.data) - { - DATA32 *sp; - - evas_cache_image_surface_alloc(&im->cache_entry, - im->source->cache_entry.w, - im->source->cache_entry.h); - - sp = im->source->image.data; - if (im->alpha) - evas_common_soft8_image_convert_from_rgba(im, sp); - else - evas_common_soft8_image_convert_from_rgb(im, sp); - } - evas_cache_image_drop(&im->source->cache_entry); - im->source = NULL; - - return 0; -} - -/* Soft16_Image * */ -/* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */ -/* int copy) */ -/* { */ -/* Soft16_Image *im; */ - -/* if (stride < 0) stride = _calc_stride(w); */ - -/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ -/* if (!im) return NULL; */ - -/* if (pixels) */ -/* { */ -/* if (copy) */ -/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ -/* else */ -/* { */ -/* im->pixels = pixels; */ -/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ -/* } */ -/* } */ -/* return im; */ -/* } */ - -static inline void -_get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im, - Eina_Rectangle * clip) -{ - if (dc->clip.use) - { - EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, - dc->clip.h); - if (clip->x < 0) - { - clip->w += clip->x; - clip->x = 0; - } - if (clip->y < 0) - { - clip->h += clip->y; - clip->y = 0; - } - if ((clip->x + clip->w) > (int)im->cache_entry.w) - clip->w = im->cache_entry.w - clip->x; - if ((clip->y + clip->h) > (int)im->cache_entry.h) - clip->h = im->cache_entry.h - clip->y; - } - else - { - EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); - } -} - -static inline int -_is_empty_rectangle(const Eina_Rectangle * r) -{ - return (r->w < 1) || (r->h < 1); -} - -static inline void -_shrink(int *s_pos, int *s_size, int pos, int size) -{ - int d; - - d = (*s_pos) - pos; - if (d < 0) - { - (*s_size) += d; - (*s_pos) = pos; - } - - d = size + pos - (*s_pos); - if ((*s_size) > d) - (*s_size) = d; -} - -static int -_soft8_adjust_areas(Eina_Rectangle * src, - int src_max_x, int src_max_y, Eina_Rectangle * dst, - int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip) -{ - if (_is_empty_rectangle(src) || - _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip)) - return 0; - - /* shrink clip */ - _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); - _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); - if (_is_empty_rectangle(dst_clip)) - return 0; - - /* sanitise x */ - if (src->x < 0) - { - dst->x -= (src->x * dst->w) / src->w; - dst->w += (src->x * dst->w) / src->w; - src->w += src->x; - src->x = 0; - } - if (src->x >= src_max_x) - return 0; - if ((src->x + src->w) > src_max_x) - { - dst->w = (dst->w * (src_max_x - src->x)) / (src->w); - src->w = src_max_x - src->x; - } - if (dst->w <= 0) - return 0; - if (src->w <= 0) - return 0; - if (dst_clip->x < 0) - { - dst_clip->w += dst_clip->x; - dst_clip->x = 0; - } - if (dst_clip->w <= 0) - return 0; - if (dst_clip->x >= dst_max_x) - return 0; - - _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); - if (dst_clip->w <= 0) - return 0; - - /* sanitise y */ - if (src->y < 0) - { - dst->y -= (src->y * dst->h) / src->h; - dst->h += (src->y * dst->h) / src->h; - src->h += src->y; - src->y = 0; - } - if (src->y >= src_max_y) - return 0; - if ((src->y + src->h) > src_max_y) - { - dst->h = (dst->h * (src_max_y - src->y)) / (src->h); - src->h = src_max_y - src->y; - } - if (dst->h <= 0) - return 0; - if (src->h <= 0) - return 0; - if (dst_clip->y < 0) - { - dst_clip->h += dst_clip->y; - dst_clip->y = 0; - } - if (dst_clip->h <= 0) - return 0; - if (dst_clip->y >= dst_max_y) - return 0; - - _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); - if (dst_clip->h <= 0) - return 0; - - return 1; -} - -static void -_soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - Eina_Rectangle sr, Eina_Rectangle dr) -{ - Eina_Rectangle cr; - - if (! - (RECTS_INTERSECT - (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - if (! - (RECTS_INTERSECT - (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - _get_clip(dc, dst, &cr); - if (!_soft8_adjust_areas - (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, - dst->cache_entry.h, &cr)) - return; - - if ((dr.w == sr.w) && (dr.h == sr.h)) - evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr); - else - evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); -} - -EAPI void -evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst, - RGBA_Draw_Context * dc, - 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, - int smooth __UNUSED__) -{ - Eina_Rectangle sr, dr; - Cutout_Rects *rects; - Cutout_Rect *r; - struct RGBA_Draw_Context_clip clip_bkp; - int i; - - /* handle cutouts here! */ - EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, - dst_region_h); - - if (_is_empty_rectangle(&dr)) - return; - if (! - (RECTS_INTERSECT - (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - - EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, - src_region_h); - - if (_is_empty_rectangle(&sr)) - return; - if (! - (RECTS_INTERSECT - (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) - return; - - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); - return; - } - - /* save out clip info */ - clip_bkp = dc->clip; - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, - dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, - dst_region_w, dst_region_h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip = clip_bkp; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; i++) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); - } - evas_common_draw_context_apply_clear_cutouts(rects); - dc->clip = clip_bkp; -} - -EAPI Soft8_Image * -evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha) -{ - Soft8_Image *new_im; - - if (im->cache_entry.flags.alpha == have_alpha) - return im; - - new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry); - - new_im->cache_entry.flags.alpha = have_alpha; - - if (im->cache_entry.w > 0 && im->cache_entry.h) - new_im = - (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry, - im->cache_entry.w, - im->cache_entry.h); - - return new_im; -} - -/* Soft16_Image * */ -/* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */ -/* { */ -/* Soft16_Image *new_im; */ -/* DATA16 *dp, *sp; */ -/* int i, cw, ch, ew; */ - -/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ - -/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ - -/* if (old_im->cache_entry.w < new_im->cache_entry.w) */ -/* cw = old_im->cache_entry.w; */ -/* else */ -/* cw = new_im->cache_entry.w; */ - -/* ew = new_im->cache_entry.w - cw; */ - -/* if (old_im->cache_entry.h < new_im->cache_entry.h) */ -/* ch = old_im->cache_entry.h; */ -/* else */ -/* ch = new_im->cache_entry.h; */ - -/* dp = new_im->pixels; */ -/* sp = old_im->pixels; */ -/* for (i = 0; i < ch; i++) */ -/* { */ -/* memcpy(dp, sp, cw * sizeof(DATA16)); */ -/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ - -/* dp += new_im->stride; */ -/* sp += old_im->stride; */ -/* } */ - -/* if (old_im->flags.have_alpha) */ -/* { */ -/* DATA8 *dp, *sp; */ - -/* dp = new_im->alpha; */ -/* sp = old_im->alpha; */ -/* for (i = 0; i < ch; i++) */ -/* { */ -/* memcpy(dp, sp, cw * sizeof(DATA8)); */ -/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ - -/* dp += new_im->stride; */ -/* sp += old_im->stride; */ -/* } */ -/* } */ - -/* evas_cache_image_drop(&old_im->cache_entry); */ -/* return new_im; */ -/* } */ diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c deleted file mode 100644 index fb7027e..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c +++ /dev/null @@ -1,230 +0,0 @@ -#include -#include "evas_soft8_scanline_fill.c" -#include - -typedef struct _RGBA_Edge RGBA_Edge; -typedef struct _RGBA_Vertex RGBA_Vertex; - -struct _RGBA_Edge { - float x, dx; - int i; -}; - -struct _RGBA_Vertex { - float x, y; - int i; -}; - -#define POLY_EDGE_DEL(_i) \ -{ \ - int _j; \ - \ - for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ - if (_j < num_active_edges) \ - { \ - num_active_edges--; \ - memmove(&(edges[_j]), &(edges[_j + 1]), \ - (num_active_edges - _j) * sizeof(RGBA_Edge)); \ - } \ -} - -#define POLY_EDGE_ADD(_i, _y) \ -{ \ - int _j; \ - float _dx; \ - RGBA_Vertex *_p, *_q; \ - if (_i < (n - 1)) _j = _i + 1; \ - else _j = 0; \ - if (point[_i].y < point[_j].y) \ - { \ - _p = &(point[_i]); \ - _q = &(point[_j]); \ - } \ - else \ - { \ - _p = &(point[_j]); \ - _q = &(point[_i]); \ - } \ - edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ - edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ - edges[num_active_edges].i = _i; \ - num_active_edges++; \ -} - -static int -polygon_point_sorter(const void *a, const void *b) -{ - RGBA_Vertex *p, *q; - - p = (RGBA_Vertex *) a; - q = (RGBA_Vertex *) b; - if (p->y <= q->y) - return -1; - return 1; -} - -static int -polygon_edge_sorter(const void *a, const void *b) -{ - RGBA_Edge *p, *q; - - p = (RGBA_Edge *) a; - q = (RGBA_Edge *) b; - if (p->x <= q->x) - return -1; - return 1; -} - -void -evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, - RGBA_Polygon_Point * points, int x, int y) -{ - RGBA_Polygon_Point *pt; - RGBA_Vertex *point; - RGBA_Edge *edges; - int num_active_edges; - int n; - int i, j, k; - int y0, y1, yi; - int ext_x, ext_y, ext_w, ext_h; - int *sorted_index; - DATA8 alpha; - DATA8 gry8; - - alpha = A_VAL(&dc->col.col); - if (alpha == 0) - return; - alpha++; - - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - ext_x = 0; - ext_y = 0; - ext_w = dst->cache_entry.w; - ext_h = dst->cache_entry.h; - if (dc->clip.use) - RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, - dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); - - if ((ext_w <= 0) || (ext_h <= 0)) - return; - - n = 0; - EINA_INLIST_FOREACH(points, pt) n++; - - if (n < 3) - return; - - edges = malloc(sizeof(RGBA_Edge) * n); - if (!edges) - return; - - point = malloc(sizeof(RGBA_Vertex) * n); - if (!point) - { - free(edges); - return; - } - - sorted_index = malloc(sizeof(int) * n); - if (!sorted_index) - { - free(edges); - free(point); - return; - } - - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); - - for (k = 0; k < n; k++) - sorted_index[k] = point[k].i; - - k = 0; - EINA_INLIST_FOREACH(points, pt) - { - point[k].x = pt->x + x; - point[k].y = pt->y + y; - point[k].i = k; - k++; - } - - y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); - y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); - - k = 0; - num_active_edges = 0; - - for (yi = y0; yi <= y1; yi++) - { - for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) - { - i = sorted_index[k]; - - if (i > 0) - j = i - 1; - else - j = n - 1; - if (point[j].y <= ((float)yi - 0.5)) - { - POLY_EDGE_DEL(j)} - else if (point[j].y > ((float)yi + 0.5)) - { - POLY_EDGE_ADD(j, yi)} - if (i < (n - 1)) - j = i + 1; - else - j = 0; - if (point[j].y <= ((float)yi - 0.5)) - { - POLY_EDGE_DEL(i)} - else if (point[j].y > ((float)yi + 0.5)) - { - POLY_EDGE_ADD(i, yi)} - } - - qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); - - for (j = 0; j < num_active_edges; j += 2) - { - int x0, x1; - - x0 = ceil(edges[j].x - 0.5); - if (j < (num_active_edges - 1)) - x1 = floor(edges[j + 1].x - 0.5); - else - x1 = x0; - if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) - { - DATA8 *dst_itr; - int w; - - if (x0 < ext_x) - x0 = ext_x; - if (x1 >= (ext_x + ext_w)) - x1 = ext_x + ext_w - 1; - - w = (x1 - x0) + 1; - dst_itr = dst->pixels + (yi * dst->stride) + x0; - - if (alpha == 0xff) - _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); - else - _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); - } - edges[j].x += edges[j].dx; - edges[j + 1].x += edges[j + 1].dx; - } - } - - free(edges); - free(point); - free(sorted_index); -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c deleted file mode 100644 index 150f262..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c +++ /dev/null @@ -1,125 +0,0 @@ -#include "evas_common_soft8.h" -#include "evas_soft8_scanline_fill.c" - -static inline int -_is_empty_rectangle(const Eina_Rectangle * r) -{ - return (r->w < 1) || (r->h < 1); -} - -static inline void -_soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h, - DATA8 gry8) -{ - DATA8 *dst_itr; - int i; - - dst_itr = dst->pixels + offset; - - for (i = 0; i < h; i++, dst_itr += dst->stride) - _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); -} - -static inline void -_soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h, - DATA8 gry8, DATA8 alpha) -{ - DATA8 *dst_itr; - int i; - - dst_itr = dst->pixels + offset; - alpha++; - - for (i = 0; i < h; i++, dst_itr += dst->stride) - _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); -} - -static void -_soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc, - Eina_Rectangle dr) -{ - int dst_offset; - - if (_is_empty_rectangle(&dr)) - return; - RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, - dst->cache_entry.h); - if (_is_empty_rectangle(&dr)) - return; - - if (dc->clip.use) - RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, - dc->clip.y, dc->clip.w, dc->clip.h); - if (_is_empty_rectangle(&dr)) - return; - if (A_VAL(&dc->col.col) == 0) - return; - - dst_offset = dr.x + (dr.y * dst->stride); - - if (!dst->cache_entry.flags.alpha) - { - DATA8 gry8; - DATA8 alpha; - - alpha = A_VAL(&dc->col.col); - gry8 = GRY_8_FROM_RGB(&dc->col.col); - - if (alpha == 0xff) - _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8); - else if (alpha > 0) - _soft8_rectangle_draw_transp_solid - (dst, dst_offset, dr.w, dr.h, gry8, alpha); - } - else - ERR("Unsupported feature: drawing rectangle to non-opaque destination."); -} - -void -evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, - int x, int y, int w, int h) -{ - Eina_Rectangle dr; - Cutout_Rects *rects; - Cutout_Rect *r; - struct RGBA_Draw_Context_clip c_bkp; - int i; - - /* handle cutouts here! */ - EINA_RECTANGLE_SET(&dr, x, y, w, h); - - if (_is_empty_rectangle(&dr)) - return; - if (! - (RECTS_INTERSECT - (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) - return; - - /* no cutouts - cut right to the chase */ - if (!dc->cutout.rects) - { - _soft8_rectangle_draw_int(dst, dc, dr); - return; - } - - c_bkp = dc->clip; - - evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, - dst->cache_entry.h); - evas_common_draw_context_clip_clip(dc, x, y, w, h); - /* our clip is 0 size.. abort */ - if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) - { - dc->clip = c_bkp; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); - _soft8_rectangle_draw_int(dst, dc, dr); - } - evas_common_draw_context_apply_clear_cutouts(rects); - dc->clip = c_bkp; -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c deleted file mode 100644 index 5fc62c2..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c +++ /dev/null @@ -1,447 +0,0 @@ -/** NOTE: This file is meant to be included by users **/ - -/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. - ** this is due our division by 256 when multiplying the color. - **/ - -/***************************************************************************** - * Scanline processing - * - * _soft8_scanline___[_]() - * - ****************************************************************************/ - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha) -{ - if (alpha == 0xff) - *p_dst = src; - else if (alpha != 0) - { - *p_dst = GRY_8_BLEND(src, *p_dst, alpha); - } -} - -/*********************************************************************** - * Regular blend operations - */ -static void -_soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst, - int size) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - /* work on 8 pixels per time, do data preload */ - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - /* empirical tests show these give the best performance */ - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1); - - alpha1 = alpha[-6]; - _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2); - - alpha2 = alpha[-5]; - _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1); - - alpha1 = alpha[-4]; - _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2); - - alpha2 = alpha[-3]; - _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1); - - alpha1 = alpha[-2]; - _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2); - - alpha2 = alpha[-1]; - _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1); - - _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2); - } - - /* remaining pixels (up to 7) */ - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft8_pt_blend_transp_solid(start, *src, *alpha); -} - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src) -{ - *p_dst = src; -} - -static inline void -_soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size) -{ - memcpy(dst, src, size * sizeof(DATA8)); -} - -/*********************************************************************** - * Blend operations taking an extra alpha (fade in, out) - */ - -static inline void -_soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha, - DATA8 rel_alpha) -{ - alpha = alpha * rel_alpha; - if (alpha == 0) - return; - - alpha++; - *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha); -} - -static void -_soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha, - DATA8 * dst, int size, - const DATA8 rel_alpha) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 8, src[-8], alpha1, rel_alpha); - - alpha1 = alpha[-6]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 7, src[-7], alpha2, rel_alpha); - - alpha2 = alpha[-5]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 6, src[-6], alpha1, rel_alpha); - - alpha1 = alpha[-4]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 5, src[-5], alpha2, rel_alpha); - - alpha2 = alpha[-3]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 4, src[-4], alpha1, rel_alpha); - - alpha1 = alpha[-2]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 3, src[-3], alpha2, rel_alpha); - - alpha2 = alpha[-1]; - _soft8_pt_blend_transp_solid_mul_alpha - (start - 2, src[-2], alpha1, rel_alpha); - - _soft8_pt_blend_transp_solid_mul_alpha - (start - 1, src[-1], alpha2, rel_alpha); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); -} - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha) -{ - *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha); -} - -static void -_soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size, - DATA8 rel_alpha) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); - start++; src++;} - ); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); -} - -/*********************************************************************** - * Blend operations with extra alpha and multiply color - */ - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, - DATA8 alpha, DATA8 rel_alpha, - DATA8 r, DATA8 g, DATA8 b) -{ - alpha = alpha * rel_alpha; - if (alpha == 0) - return; - - alpha++; - - DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; - *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); -} - -static void -_soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha, - DATA8 * dst, int size, - DATA8 rel_alpha, DATA8 r, - DATA8 g, DATA8 b) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(src, 32); - pld(start, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 8, src[-8], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-6]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 7, src[-7], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-5]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 6, src[-6], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-4]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 5, src[-5], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-3]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 4, src[-4], alpha1, rel_alpha, r, g, b); - - alpha1 = alpha[-2]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 3, src[-3], alpha2, rel_alpha, r, g, b); - - alpha2 = alpha[-1]; - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 2, src[-2], alpha1, rel_alpha, r, g, b); - - _soft8_pt_blend_transp_solid_mul_color_transp - (start - 1, src[-1], alpha2, rel_alpha, r, g, b); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft8_pt_blend_transp_solid_mul_color_transp - (start, *src, *alpha, rel_alpha, r, g, b); -} - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, - DATA8 rel_alpha, DATA8 r, DATA8 g, - DATA8 b) -{ - DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; - *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha); -} - -static void -_soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst, - int size, DATA8 rel_alpha, - DATA8 r, DATA8 g, DATA8 b) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_color_transp - (start, *src, rel_alpha, r, g, b); start++; src++;} - ); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft8_pt_blend_solid_solid_mul_color_transp - (start, *src, rel_alpha, r, g, b); -} - -/*********************************************************************** - * Blend operations with extra multiply color - */ -EFL_ALWAYS_INLINE void -_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, - DATA8 alpha, DATA8 r, DATA8 g, - DATA8 b) -{ - if (alpha == 0) - return; - - DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; - - if (alpha == 0xff) - *p_dst = gry8; - else - { - *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); - } -} - -static void -_soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha, - DATA8 * dst, int size, - DATA8 r, DATA8 g, DATA8 b) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(alpha, 0); - pld(src, 0); - - while (start < end) - { - DATA8 alpha1, alpha2; - - alpha1 = alpha[0]; - alpha += 8; - - pld(alpha, 8); - pld(src, 32); - - src += 8; - start += 8; - - alpha2 = alpha[-7]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 8, src[-8], alpha1, r, g, b); - - alpha1 = alpha[-6]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 7, src[-7], alpha2, r, g, b); - - alpha2 = alpha[-5]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 6, src[-6], alpha1, r, g, b); - - alpha1 = alpha[-4]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 5, src[-5], alpha2, r, g, b); - - alpha2 = alpha[-3]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 4, src[-4], alpha1, r, g, b); - - alpha1 = alpha[-2]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 3, src[-3], alpha2, r, g, b); - - alpha2 = alpha[-1]; - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 2, src[-2], alpha1, r, g, b); - - _soft8_pt_blend_transp_solid_mul_color_solid - (start - 1, src[-1], alpha2, r, g, b); - } - - end = start + (size & 7); - for (; start < end; start++, src++, alpha++) - _soft8_pt_blend_transp_solid_mul_color_solid - (start, *src, *alpha, r, g, b); -} - -EFL_ALWAYS_INLINE void -_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r, - DATA8 g, DATA8 b) -{ - *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; -} - -static void -_soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst, - int size, DATA8 r, DATA8 g, - DATA8 b) -{ - DATA8 *start, *end; - - start = dst; - end = start + (size & ~7); - - pld(src, 0); - - while (start < end) - { - pld(src, 32); - UNROLL8( - { - _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, - b); start++; - src++;} - ); - } - - end = start + (size & 7); - for (; start < end; start++, src++) - _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); -} diff --git a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c b/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c deleted file mode 100644 index f1f3b8f..0000000 --- a/libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c +++ /dev/null @@ -1,53 +0,0 @@ -/** NOTE: This file is meant to be included by users **/ - -/***************************************************************************** - * Point processing - * - * _soft8_pt___[_]() - * - * Scanline processing - * - * _soft8_scanline___[_]() - * - ****************************************************************************/ -EFL_ALWAYS_INLINE void -_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8) -{ - *dst = gry8; -} - -EFL_ALWAYS_INLINE void -_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8) -{ - memset(dst, gry8, size); -} - -EFL_ALWAYS_INLINE void -_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha) -{ - *dst = GRY_8_BLEND(gry8, *dst, alpha); -} - -static void -_soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8, - DATA8 alpha) -{ - DATA8 *start, *end; - - start = dst; - pld(start, 0); - end = start + (size & ~7); - - while (start < end) - { - pld(start, 32); - UNROLL8( - { - _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;} - ); - } - - end = start + (size & 7); - for (; start < end; start++) - _soft8_pt_fill_transp_solid(start, gry8, alpha); -} diff --git a/libraries/evas/src/lib/file/Makefile.am b/libraries/evas/src/lib/file/Makefile.am deleted file mode 100644 index 84b12d9..0000000 --- a/libraries/evas/src/lib/file/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@FREETYPE_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EVIL_CFLAGS@ \ -@PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_file.la -libevas_file_la_SOURCES = \ -evas_path.c \ -evas_module.c -libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ - -EXTRA_DIST = evas_module.h evas_path.h diff --git a/libraries/evas/src/lib/file/Makefile.in b/libraries/evas/src/lib/file/Makefile.in deleted file mode 100644 index 52d3608..0000000 --- a/libraries/evas/src/lib/file/Makefile.in +++ /dev/null @@ -1,682 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/file -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_file_la_DEPENDENCIES = -am_libevas_file_la_OBJECTS = evas_path.lo evas_module.lo -libevas_file_la_OBJECTS = $(am_libevas_file_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_file_la_SOURCES) -DIST_SOURCES = $(libevas_file_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@FREETYPE_CFLAGS@ \ -@EINA_CFLAGS@ \ -@EVIL_CFLAGS@ \ -@PIXMAN_CFLAGS@ - -noinst_LTLIBRARIES = libevas_file.la -libevas_file_la_SOURCES = \ -evas_path.c \ -evas_module.c - -libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ -EXTRA_DIST = evas_module.h evas_path.h -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/file/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/file/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_file.la: $(libevas_file_la_OBJECTS) $(libevas_file_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libevas_file_la_OBJECTS) $(libevas_file_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_path.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/file/evas_module.c b/libraries/evas/src/lib/file/evas_module.c deleted file mode 100644 index dc0d26b..0000000 --- a/libraries/evas/src/lib/file/evas_module.c +++ /dev/null @@ -1,582 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include -#include -#include - - -static Eina_Hash *evas_modules[4] = { - NULL, - NULL, - NULL, - NULL -}; - -static Eina_List *eina_evas_modules = NULL; -static Eina_List *evas_module_paths = NULL; -static Eina_Array *evas_engines = NULL; - -static Eina_List * -_evas_module_append(Eina_List *list, char *path) -{ - if (path) - { - if (evas_file_path_exists(path)) - list = eina_list_append(list, path); - else - free(path); - } - return list; -} - -/* this will alloc a list of paths to search for the modules */ -/* by now these are: */ -/* 1. ~/.evas/modules/ */ -/* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ -/* 3. dladdr/evas/modules/ */ -/* 4. PREFIX/evas/modules/ */ -void -evas_module_paths_init(void) -{ - char *path; - - /* 1. ~/.evas/modules/ */ - path = eina_module_environment_path_get("HOME", "/.evas/modules"); - evas_module_paths = _evas_module_append(evas_module_paths, path); - - /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ - path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules"); - if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) - free(path); - else - evas_module_paths = _evas_module_append(evas_module_paths, path); - - /* 3. libevas.so/../evas/modules/ */ - path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules"); - if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) - free(path); - else - evas_module_paths = _evas_module_append(evas_module_paths, path); - - /* 4. PREFIX/evas/modules/ */ -#ifndef _MSC_VER - path = PACKAGE_LIB_DIR "/evas/modules"; - if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) - { - path = strdup(path); - if (path) - evas_module_paths = _evas_module_append(evas_module_paths, path); - } -#endif -} - -#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \ - Eina_Bool evas_##Tn##_##Name##_init(void); \ - void evas_##Tn##_##Name##_shutdown(void); - -#define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \ - { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown } - -EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer); -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_x11); -EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl); -EVAS_EINA_STATIC_MODULE_DEFINE(engine, psl1ght); -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); -EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince); -EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11); -EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8); -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_x11); -EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp); -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, 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); -EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png); -EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff); - -static const struct { - Eina_Bool (*init)(void); - void (*shutdown)(void); -} evas_static_module[] = { -#ifdef EVAS_STATIC_BUILD_BUFFER - EVAS_EINA_STATIC_MODULE_USE(engine, buffer), -#endif -#ifdef EVAS_STATIC_BUILD_DIRECT3D - EVAS_EINA_STATIC_MODULE_USE(engine, direct3d), -#endif -#ifdef EVAS_STATIC_BUILD_DIRECTFB - EVAS_EINA_STATIC_MODULE_USE(engine, directfb), -#endif -#ifdef EVAS_STATIC_BUILD_FB - EVAS_EINA_STATIC_MODULE_USE(engine, fb), -#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_PSL1GHT - EVAS_EINA_STATIC_MODULE_USE(engine, psl1ght), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16 - EVAS_EINA_STATIC_MODULE_USE(engine, software_16), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW - EVAS_EINA_STATIC_MODULE_USE(engine, software_16_ddraw), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL - EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE - EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11 - EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW - EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_GDI - EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_8 - EVAS_EINA_STATIC_MODULE_USE(engine, software_8), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_8_X11 - EVAS_EINA_STATIC_MODULE_USE(engine, software_8_x11), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC - EVAS_EINA_STATIC_MODULE_USE(engine, software_generic), -#endif -#ifdef EVAS_STATIC_BUILD_SOFTWARE_X11 - EVAS_EINA_STATIC_MODULE_USE(engine, software_x11), -#endif -#ifdef EVAS_STATIC_BUILD_BMP - EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp), -#endif -#ifdef EVAS_STATIC_BUILD_EDB - EVAS_EINA_STATIC_MODULE_USE(image_loader, edb), -#endif -#ifdef EVAS_STATIC_BUILD_EET - EVAS_EINA_STATIC_MODULE_USE(image_loader, eet), -#endif -#ifdef EVAS_STATIC_BUILD_GENERIC - EVAS_EINA_STATIC_MODULE_USE(image_loader, generic), -#endif -#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_PMAPS - EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps), -#endif -#ifdef EVAS_STATIC_BUILD_PNG - EVAS_EINA_STATIC_MODULE_USE(image_loader, png), -#endif -#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_XPM - EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm), -#endif -#ifdef EVAS_STATIC_BUILD_EDB - EVAS_EINA_STATIC_MODULE_USE(image_saver, edb), -#endif -#ifdef EVAS_STATIC_BUILD_EET - EVAS_EINA_STATIC_MODULE_USE(image_saver, eet), -#endif -#if defined (EVAS_BUILD_SAVER_JPEG) && defined (EVAS_STATIC_BUILD_JPEG) - EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg), -#endif -#ifdef EVAS_STATIC_BUILD_PNG - EVAS_EINA_STATIC_MODULE_USE(image_saver, png), -#endif -#ifdef EVAS_STATIC_BUILD_TIFF - EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff), -#endif - { NULL, NULL } -}; - -/* this will alloc an Evas_Module struct for each module - * it finds on the paths */ -void -evas_module_init(void) -{ - int i; - - evas_module_paths_init(); - - evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); - evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); - evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); - evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); - - evas_engines = eina_array_new(4); - - for (i = 0; evas_static_module[i].init; ++i) - evas_static_module[i].init(); -} - -Eina_Bool -evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type) -{ - Evas_Module *em; - - if ((unsigned int)type > 3) return EINA_FALSE; - if (!module) return EINA_FALSE; - if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE; - - em = eina_hash_find(evas_modules[type], module->name); - if (em) return EINA_FALSE; - - em = calloc(1, sizeof (Evas_Module)); - if (!em) return EINA_FALSE; - - em->definition = module; - - if (type == EVAS_MODULE_TYPE_ENGINE) - { - eina_array_push(evas_engines, em); - em->id_engine = eina_array_count(evas_engines); - } - - eina_hash_direct_add(evas_modules[type], module->name, em); - - return EINA_TRUE; -} - -Eina_List * -evas_module_engine_list(void) -{ - Evas_Module *em; - Eina_List *r = NULL; - Eina_Array_Iterator iterator; - unsigned int i; - - EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator) - r = eina_list_append(r, em->definition->name); - - return r; -} - -Eina_Bool -evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type) -{ - Evas_Module *em; - - if ((unsigned int)type > 3) return EINA_FALSE; - if (!module) return EINA_FALSE; - - em = eina_hash_find(evas_modules[type], module->name); - if (!em || em->definition != module) return EINA_FALSE; - - if (type == EVAS_MODULE_TYPE_ENGINE) - eina_array_data_set(evas_engines, em->id_engine, NULL); - - eina_hash_del(evas_modules[type], module->name, em); - free(em); - - return EINA_TRUE; -} - -#if defined(__CEGCC__) || defined(__MINGW32CE__) -# define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll" -# define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll" -# define EVAS_MODULE_NAME_ENGINE "engine_%s.dll" -# define EVAS_MODULE_NAME_OBJECT "object_%s.dll" -#elif _WIN32 -# define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll" -# define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll" -# define EVAS_MODULE_NAME_ENGINE "module.dll" -# define EVAS_MODULE_NAME_OBJECT "module.dll" -#else -# define EVAS_MODULE_NAME_IMAGE_SAVER "module.so" -# define EVAS_MODULE_NAME_IMAGE_LOADER "module.so" -# define EVAS_MODULE_NAME_ENGINE "module.so" -# define EVAS_MODULE_NAME_OBJECT "module.so" -#endif - -Evas_Module * -evas_module_find_type(Evas_Module_Type type, const char *name) -{ - const char *path; - const char *format = NULL; - char buffer[4096]; - Evas_Module *em; - Eina_Module *en; - Eina_List *l; - - if ((unsigned int)type > 3) return NULL; - - em = eina_hash_find(evas_modules[type], name); - if (em) return em; - - EINA_LIST_FOREACH(evas_module_paths, l, path) - { - switch (type) - { - case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break; - case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break; - case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break; - case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break; - } - - snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name); - if (!evas_file_path_is_file(buffer)) continue; - - en = eina_module_new(buffer); - if (!en) continue; - - if (!eina_module_load(en)) - { - eina_module_free(en); - continue; - } - - em = eina_hash_find(evas_modules[type], name); - if (em) - { - eina_evas_modules = eina_list_append(eina_evas_modules, en); - return em; - } - - eina_module_free(en); - } - - return NULL; -} - -Evas_Module * -evas_module_engine_get(int render_method) -{ - if ((render_method <= 0) || - ((unsigned int)render_method > eina_array_count(evas_engines))) - return NULL; - return eina_array_data_get(evas_engines, render_method - 1); -} - -void -evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata) -{ - eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata); -} - -int -evas_module_load(Evas_Module *em) -{ - if (em->loaded) return 1; - if (!em->definition) return 0; - - if (!em->definition->func.open(em)) return 0; - em->loaded = 1; - -#ifdef BUILD_ASYNC_PRELOAD - LKI(em->lock); -#endif - return 1; -} - -void -evas_module_unload(Evas_Module *em) -{ - if (!em->loaded) - return; - if (!em->definition) - return ; - -// for now lets not unload modules - they may still be in use. -// em->definition->func.close(em); -// em->loaded = 0; - -#ifdef BUILD_ASYNC_PRELOAD - LKD(em->lock); -#endif -} - -void -evas_module_ref(Evas_Module *em) -{ -#ifdef BUILD_ASYNC_PRELOAD - LKL(em->lock); -#endif - em->ref++; -#ifdef BUILD_ASYNC_PRELOAD - LKU(em->lock); -#endif -} - -void -evas_module_unref(Evas_Module *em) -{ -#ifdef BUILD_ASYNC_PRELOAD - LKL(em->lock); -#endif - em->ref--; -#ifdef BUILD_ASYNC_PRELOAD - LKU(em->lock); -#endif -} - -static int use_count = 0; - -void -evas_module_use(Evas_Module *em) -{ - em->last_used = use_count; -} - -void -evas_module_clean(void) -{ - static int call_count = 0; -/* int ago; */ - int noclean = -1; -/* Eina_List *l; */ -/* Evas_Module *em; */ - - /* only clean modules every 256 calls */ - call_count++; - if (call_count <= 256) return; - call_count = 0; - - if (noclean == -1) - { - if (getenv("EVAS_NOCLEAN")) - noclean = 1; - else - noclean = 0; - } - if (noclean == 1) return; - - /* disable module cleaning for now - may cause instability with some modules */ - return; - - /* FIXME: Don't know what it is supposed to do. */ -/* /\* incriment use counter = 28bits *\/ */ -/* use_count++; */ -/* if (use_count > 0x0fffffff) use_count = 0; */ - -/* /\* printf("CLEAN!\n"); *\/ */ -/* /\* go through all modules *\/ */ -/* EINA_LIST_FOREACH(evas_modules, l, em) */ -/* { */ -/* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */ -/* /\* if the module is refernced - skip *\/ */ -/* if ((em->ref > 0) || (!em->loaded)) continue; */ -/* /\* how many clean cycles ago was this module last used *\/ */ -/* ago = use_count - em->last_used; */ -/* if (em->last_used > use_count) ago += 0x10000000; */ -/* /\* if it was used last more than N clean cycles ago - unload *\/ */ -/* if (ago > 5) */ -/* { */ -/* /\* printf(" UNLOAD %s\n", em->name); *\/ */ -/* evas_module_unload(em); */ -/* } */ -/* } */ -} - -/* will dlclose all the modules loaded and free all the structs */ -void -evas_module_shutdown(void) -{ - Eina_Module *en; - char *path; - int i; - - for (i = 0; evas_static_module[i].shutdown; ++i) - evas_static_module[i].shutdown(); - - EINA_LIST_FREE(eina_evas_modules, en) - eina_module_free(en); - - eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]); - evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL; - eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]); - evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = NULL; - eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]); - evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL; - eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]); - evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL; - - EINA_LIST_FREE(evas_module_paths, path) - free(path); - - eina_array_free(evas_engines); - evas_engines = NULL; -} - -EAPI int -_evas_module_engine_inherit(Evas_Func *funcs, char *name) -{ - Evas_Module *em; - - em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); - if (em) - { - if (evas_module_load(em)) - { - /* FIXME: no way to unref */ - evas_module_ref(em); - evas_module_use(em); - *funcs = *((Evas_Func *)(em->functions)); - return 1; - } - } - return 0; -} - -static Eina_Prefix *pfx = NULL; - -EAPI const char * -_evas_module_libdir_get(void) -{ - if (!pfx) pfx = eina_prefix_new - (NULL, _evas_module_libdir_get, "EVAS", "evas", NULL, - PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); - if (!pfx) return NULL; - return eina_prefix_lib_get(pfx); -} diff --git a/libraries/evas/src/lib/file/evas_module.h b/libraries/evas/src/lib/file/evas_module.h deleted file mode 100644 index 8699b6b..0000000 --- a/libraries/evas/src/lib/file/evas_module.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _EVAS_MODULE_H -#define _EVAS_MODULE_H - - -/* the module api version */ -#define EVAS_MODULE_API_VERSION 2 - - -/* the module types */ -typedef enum _Evas_Module_Type -{ - EVAS_MODULE_TYPE_ENGINE = 0, - EVAS_MODULE_TYPE_IMAGE_LOADER = 1, - EVAS_MODULE_TYPE_IMAGE_SAVER = 2, - EVAS_MODULE_TYPE_OBJECT = 3 -} Evas_Module_Type; - - -typedef struct _Evas_Module_Api Evas_Module_Api; -typedef struct _Evas_Module Evas_Module; -typedef struct _Evas_Module_Path Evas_Module_Path; -typedef struct _Evas_Module_Engine Evas_Module_Engine; -typedef struct _Evas_Module_Public Evas_Module_Public; - -/* the module api structure, all modules should define this struct */ -struct _Evas_Module_Api -{ - int version; - const char *name; - const char *author; - - struct - { - int (*open)(Evas_Module *); - void (*close)(Evas_Module *); - } func; -}; - -/* the module structure */ -struct _Evas_Module -{ - const Evas_Module_Api *definition; - - void *functions; /* this are the functions exported by the module */ - int id_engine; /* some internal data for the module i.e the id for engines */ - - int ref; /* how many refs */ - int last_used; /* the cycle count when it was last used */ - - LK(lock); - - unsigned char loaded : 1; -}; - - -/* the internals of the module api use this struct to reference a path with a module type - * instead of deduce the type from the path. - * */ -struct _Evas_Module_Path -{ - Evas_Module_Type type; - char *path; -}; - -void evas_module_paths_init (void); -void evas_module_init (void); -Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name); -Evas_Module *evas_module_engine_get(int render_method); -void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata); -int evas_module_load (Evas_Module *em); -void evas_module_unload (Evas_Module *em); -void evas_module_ref (Evas_Module *em); -void evas_module_unref (Evas_Module *em); -void evas_module_use (Evas_Module *em); -void evas_module_clean (void); -void evas_module_shutdown (void); -EAPI Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type); -EAPI Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type); - -#define EVAS_MODULE_DEFINE(Type, Tn, Name) \ - Eina_Bool evas_##Tn##_##Name##_init(void) \ - { \ - return evas_module_register(&evas_modapi, Type); \ - } \ - void evas_##Tn##_##Name##_shutdown(void) \ - { \ - evas_module_unregister(&evas_modapi, Type); \ - } - -#define EVAS_EINA_MODULE_DEFINE(Tn, Name) \ - EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \ - EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown); - -#endif /* _EVAS_MODULE_H */ diff --git a/libraries/evas/src/lib/file/evas_path.c b/libraries/evas/src/lib/file/evas_path.c deleted file mode 100644 index 2ff646d..0000000 --- a/libraries/evas/src/lib/file/evas_path.c +++ /dev/null @@ -1,152 +0,0 @@ -/* os dependent file code. for unix-y like fs's only for now */ -/* if your os doesn't use unix-like fs starting with "/" for the root and */ -/* the file path separator isn't "/" then you may need to help out by */ -/* adding in a new set of functions here */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -/* get the casefold feature! */ -#include -#ifndef _MSC_VER -# include -# include -#endif - -#ifdef HAVE_EVIL -# include -#endif - -#include "evas_common.h" -#include "evas_private.h" - -#ifdef _WIN32 -# define EVAS_PATH_SEPARATOR "\\" -#else -# define EVAS_PATH_SEPARATOR "/" -#endif - -int -evas_file_path_is_full_path(const char *path) -{ - if (!path) return 0; -#if defined _WIN32_WCE - if (path[0] == '\\') return 1; -#elif defined _WIN32 - if (evil_path_is_absolute(path)) return 1; -#else - if (path[0] == '/') return 1; -#endif - return 0; -} - -char * -evas_file_path_join(const char *path, const char *end) -{ - char *res = NULL; - size_t len; - - if ((!path) && (!end)) return NULL; - if (!path) return strdup(end); - if (!end) return strdup(path); - len = strlen(path); - len += strlen(end); - len += strlen(EVAS_PATH_SEPARATOR); - res = malloc(len + 1); - if (!res) return NULL; - strcpy(res, path); - strcat(res, EVAS_PATH_SEPARATOR); - strcat(res, end); - return res; -} - -int -evas_file_path_exists(const char *path) -{ - struct stat st; - - if (!stat(path, &st)) return 1; - return 0; -} - -int -evas_file_path_is_file(const char *path) -{ - struct stat st; - - if (stat(path, &st) == -1) return 0; - if (S_ISREG(st.st_mode)) return 1; - return 0; -} - -int -evas_file_path_is_dir(const char *path) -{ - struct stat st; - - if (stat(path, &st) == -1) return 0; - if (S_ISDIR(st.st_mode)) return 1; - return 0; -} - -Eina_List * -evas_file_path_list(char *path, const char *match, int match_case) -{ - Eina_File_Direct_Info *info; - Eina_Iterator *it; - Eina_List *files = NULL; - int flags; - - flags = FNM_PATHNAME; -#ifdef FNM_CASEFOLD - if (!match_case) - flags |= FNM_CASEFOLD; -#else -/*#warning "Your libc does not provide case-insensitive matching!"*/ -#endif - - it = eina_file_direct_ls(path); - EINA_ITERATOR_FOREACH(it, info) - { - if (match) - { - if (fnmatch(match, info->path + info->name_start, flags) == 0) - files = eina_list_append(files, strdup(info->path + info->name_start)); - } - else - files = eina_list_append(files, strdup(info->path + info->name_start)); - } - if (it) eina_iterator_free(it); - return files; -} - -DATA64 -evas_file_modified_time(const char *file) -{ - struct stat st; - - if (stat(file, &st) < 0) return 0; - if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime; - else return (DATA64)st.st_mtime; - return 0; -} - -char * -evas_file_path_resolve(const char *file) -{ -#if 0 - char buf[PATH_MAX], *buf2; -#endif - - return strdup(file); -#if 0 - if (!realpath(file, buf)) return NULL; - buf2 = strdup(buf); - return buf2; -#endif -} diff --git a/libraries/evas/src/lib/file/evas_path.h b/libraries/evas/src/lib/file/evas_path.h deleted file mode 100644 index e0aa6bb..0000000 --- a/libraries/evas/src/lib/file/evas_path.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _EVAS_PATH_H -#define _EVAS_PATH_H - - -int evas_file_path_is_full_path (const char *path); -char *evas_file_path_join (const char *path, const char *end); -int evas_file_path_exists (const char *path); -int evas_file_path_is_file (const char *path); -int evas_file_path_is_dir (const char *path); -Eina_List *evas_file_path_list (char *path, const char *match, int match_case); -DATA64 evas_file_modified_time (const char *file); -char *evas_file_path_resolve (const char *file); - - -#endif /* _EVAS_PATH_H */ diff --git a/libraries/evas/src/lib/include/Makefile.am b/libraries/evas/src/lib/include/Makefile.am deleted file mode 100644 index 5c986c2..0000000 --- a/libraries/evas/src/lib/include/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ -evas_inline.x \ -evas_private.h \ -evas_options.h \ -evas_macros.h \ -evas_mmx.h \ -evas_common.h \ -evas_common_soft8.h \ -evas_common_soft16.h \ -evas_blend_ops.h diff --git a/libraries/evas/src/lib/include/Makefile.in b/libraries/evas/src/lib/include/Makefile.in deleted file mode 100644 index 8060178..0000000 --- a/libraries/evas/src/lib/include/Makefile.in +++ /dev/null @@ -1,546 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/lib/include -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ -evas_inline.x \ -evas_private.h \ -evas_options.h \ -evas_macros.h \ -evas_mmx.h \ -evas_common.h \ -evas_common_soft8.h \ -evas_common_soft16.h \ -evas_blend_ops.h - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/lib/include/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/lib/include/evas_blend_ops.h b/libraries/evas/src/lib/include/evas_blend_ops.h deleted file mode 100644 index 6bd1f16..0000000 --- a/libraries/evas/src/lib/include/evas_blend_ops.h +++ /dev/null @@ -1,378 +0,0 @@ -#ifndef EVAS_BLEND_OPS_H -#define EVAS_BLEND_OPS_H - -#if defined BUILD_MMX || defined BUILD_SSE -#include "evas_mmx.h" -#endif - -#include "config.h" - -#ifdef NEED_SSE3 -# if defined BUILD_SSE3 -# include -# endif -#endif - -/* src pixel flags: */ - -/* pixels none */ -#define SP_N 0 -/* pixels (argb default) */ -#define SP 1 -/* pixels are rgb (ie. alphas == 255) */ -#define SP_AN 2 -/* pixels alpha are sparse */ -#define SP_AS 3 -/* src pixels flags count */ -#define SP_LAST 4 - -/* src mask flags: */ - -/* mask none */ -#define SM_N 0 -/* mask (alpha) */ -#define SM 1 -/* mask alphas are 'trivial - ie. only 0 or 255 */ -#define SM_AT 2 -/* mask alphas are sparse */ -#define SM_AS 3 -/* src mask flags count */ -#define SM_LAST 4 - -/* src color flags: */ - -/* color is 0xffffffff */ -#define SC_N 0 -/* color (argb default) */ -#define SC 1 -/* color is rgb (ie. 0xffrrggbb) */ -#define SC_AN 2 -/* color is 'alpha' (ie. 0xaaaaaaaa) */ -#define SC_AA 3 -/* src color flags count */ -#define SC_LAST 4 - -/* dst pixels flags: */ - -/* pixels (argb default) */ -#define DP 0 -/* pixels are rgb (ie. alphas == 255) */ -#define DP_AN 1 -/* dst pixels flags count */ -#define DP_LAST 2 - -/* cpu types flags */ - -/* none, bad news */ -#define CPU_N 0 -/* cpu C */ -#define CPU_C 1 -/* cpu MMX */ -#define CPU_MMX 2 -/* cpu SSE */ -#define CPU_SSE 3 -/* cpu SSE2 */ -#define CPU_SSE2 4 -/* cpu flags count */ -#define CPU_NEON 5 -/* CPU SSE3 */ -#define CPU_SSE3 6 -/* cpu flags count */ -#define CPU_LAST 7 - - -/* some useful constants */ - -extern const DATA32 ALPHA_255; -extern const DATA32 ALPHA_256; - -/* some useful C macros */ - -#define MUL4_256(a, r, g, b, c) \ - ( (((((c) >> 8) & 0xff0000) * (a)) & 0xff000000) + \ - (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ - (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ - ((((c) & 0xff) * (b)) >> 8) ) - -#define MUL3_256(r, g, b, c) \ - ( (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ - (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ - ((((c) & 0xff) * (b)) >> 8) ) - -#define MUL_256(a, c) \ - ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \ - (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) ) - -#define MUL4_SYM(x, y) \ - ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \ - ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ - ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ - (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) - -#define MUL3_SYM(x, y) \ - ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ - ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ - (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) - -#define MUL_SYM(a, x) \ - ( (((((x) >> 8) & 0x00ff00ff) * (a) + 0xff00ff) & 0xff00ff00) + \ - (((((x) & 0x00ff00ff) * (a) + 0xff00ff) >> 8) & 0x00ff00ff) ) - -#define MUL_A_256(a, c) \ - ( ((((c) >> 8) & 0x00ff0000) * (a)) & 0xff000000 ) - -#define MUL_A_SYM(a, c) \ - ( (((((c) >> 8) & 0x00ff0000) * (a)) + 0x00ff0000) & 0xff000000 ) - -#define INTERP_256(a, c0, c1) \ - ( (((((((c0) >> 8) & 0xff00ff) - (((c1) >> 8) & 0xff00ff)) * (a)) \ - + ((c1) & 0xff00ff00)) & 0xff00ff00) + \ - (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ - + ((c1) & 0xff00ff)) & 0xff00ff) ) - -#define INTERP_RGB_256(a, c0, c1) \ - ( (((((((c0) >> 8) & 0xff) - (((c1) >> 8) & 0xff)) * (a)) \ - + ((c1) & 0xff00)) & 0xff00) + \ - (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ - + ((c1) & 0xff00ff)) & 0xff00ff) ) - -#define INTERP_A_256(a, c0, c1) \ - ( (((((((c0) >> 8) & 0xff0000) - (((c1) >> 8) & 0xff0000)) * (a)) \ - + ((c1) & 0xff000000)) & 0xff000000) ) - - -/* some useful MMX macros */ - -#ifdef BUILD_MMX -#define MOV_A2R(a, mma) \ - movd_m2r(a, mma); \ - punpcklwd_r2r(mma, mma); \ - punpckldq_r2r(mma, mma); - -#define MOV_P2R(c, mmc, mmz) \ - movd_m2r(c, mmc); \ - punpcklbw_r2r(mmz, mmc); - -#define MOV_R2P(mmc, c, mmz) \ - packuswb_r2r(mmz, mmc); \ - movd_r2m(mmc, c); - -#define MUL4_256_R2R(mmx, mmy) \ - pmullw_r2r(mmx, mmy); \ - psrlw_i2r(8, mmy); - -#define MUL4_SYM_R2R(mmx, mmy, mm255) \ - pmullw_r2r(mmx, mmy); \ - paddw_r2r(mm255, mmy); \ - psrlw_i2r(8, mmy); - -#define MOV_RA2R(mmx, mma) \ - movq_r2r(mmx, mma); \ - punpckhwd_r2r(mma, mma); \ - punpckhdq_r2r(mma, mma); - -#define MOV_PA2R(c, mma) \ - movd_m2r(c, mma); \ - punpcklbw_r2r(mma, mma); \ - punpckhwd_r2r(mma, mma); \ - punpckhdq_r2r(mma, mma); - -#define INTERP_256_R2R(mma, mmx, mmy, mm255) \ - psubw_r2r(mmy, mmx); \ - pmullw_r2r(mma, mmx); \ - psrlw_i2r(8, mmx); \ - paddw_r2r(mmx, mmy); \ - pand_r2r(mm255, mmy); - -#endif - - -/* some useful SSE3 inline functions */ - -#ifdef NEED_SSE3 -#ifdef BUILD_SSE3 - -static __m128i GA_MASK_SSE3; -static __m128i RB_MASK_SSE3; -static __m128i SYM4_MASK_SSE3; -static __m128i RGB_MASK_SSE3; -//static __m128i A_MASK_SSE3; - -static __m128i ALPHA_SSE3; - -static EFL_ALWAYS_INLINE __m128i -mul_256_sse3(__m128i a, __m128i c) { - - /* prepare alpha for word multiplication */ - __m128i a_l = a; - __m128i a_h = a; - a_l = _mm_unpacklo_epi16(a_l, a_l); - a_h = _mm_unpackhi_epi16(a_h, a_h); - __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); - - /* first half of calc */ - __m128i c0 = c; - c0 = _mm_srli_epi32(c0, 8); - c0 = _mm_and_si128(GA_MASK_SSE3, c0); - c0 = _mm_mullo_epi16(a0, c0); - c0 = _mm_and_si128(RB_MASK_SSE3, c0); - - /* second half of calc */ - __m128i c1 = c; - c1 = _mm_and_si128(GA_MASK_SSE3, c1); - c1 = _mm_mullo_epi16(a0, c1); - c1 = _mm_srli_epi32(c1, 8); - c1 = _mm_and_si128(GA_MASK_SSE3, c1); - - /* combine */ - return _mm_add_epi32(c0, c1); -} - -static EFL_ALWAYS_INLINE __m128i -sub4_alpha_sse3(__m128i c) { - - __m128i c0 = c; - - c0 = _mm_srli_epi32(c0, 24); - return _mm_sub_epi32(ALPHA_SSE3, c0); -} - -static EFL_ALWAYS_INLINE __m128i -interp4_256_sse3(__m128i a, __m128i c0, __m128i c1) -{ - const __m128i zero = _mm_setzero_si128(); - - __m128i a_l = a; - __m128i a_h = a; - a_l = _mm_unpacklo_epi16(a_l, a_l); - a_h = _mm_unpackhi_epi16(a_h, a_h); - - __m128i a_t = _mm_slli_epi64(a_l, 32); - __m128i a_t0 = _mm_slli_epi64(a_h, 32); - - a_l = _mm_add_epi32(a_l, a_t); - a_h = _mm_add_epi32(a_h, a_t0); - - __m128i c0_l = c0; - __m128i c0_h = c0; - - c0_l = _mm_unpacklo_epi8(c0_l, zero); - c0_h = _mm_unpackhi_epi8(c0_h, zero); - - __m128i c1_l = c1; - __m128i c1_h = c1; - - c1_l = _mm_unpacklo_epi8(c1_l, zero); - c1_h = _mm_unpackhi_epi8(c1_h, zero); - - __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l); - __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h); - - cl_sub = _mm_mullo_epi16(cl_sub, a_l); - ch_sub = _mm_mullo_epi16(ch_sub, a_h); - - __m128i c1ls = _mm_slli_epi16(c1_l, 8); - __m128i c1hs = _mm_slli_epi16(c1_h, 8); - - cl_sub = _mm_add_epi16(cl_sub, c1ls); - ch_sub = _mm_add_epi16(ch_sub, c1hs); - - cl_sub = _mm_and_si128(cl_sub, RB_MASK_SSE3); - ch_sub = _mm_and_si128(ch_sub, RB_MASK_SSE3); - - cl_sub = _mm_srli_epi64(cl_sub, 8); - ch_sub = _mm_srli_epi64(ch_sub, 8); - - cl_sub = _mm_packus_epi16(cl_sub, cl_sub); - ch_sub = _mm_packus_epi16(ch_sub, ch_sub); - - return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44); -} - -static EFL_ALWAYS_INLINE __m128i -mul_sym_sse3(__m128i a, __m128i c) { - - /* Prepare alpha for word mult */ - __m128i a_l = a; - __m128i a_h = a; - a_l = _mm_unpacklo_epi16(a_l, a_l); - a_h = _mm_unpackhi_epi16(a_h, a_h); - __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); - - /* first part */ - __m128i c0 = c; - c0 = _mm_srli_epi32(c0, 8); - c0 = _mm_and_si128(GA_MASK_SSE3, c0); - c0 = _mm_mullo_epi16(a0, c0); - c0 = _mm_add_epi32(c0, GA_MASK_SSE3); - c0 = _mm_and_si128(RB_MASK_SSE3, c0); - - /* second part */ - __m128i c1 = c; - c1 = _mm_and_si128(GA_MASK_SSE3, c1); - c1 = _mm_mullo_epi16(a0, c1); - c1 = _mm_add_epi32(c1, GA_MASK_SSE3); - c1 = _mm_srli_epi32(c1, 8); - c1 = _mm_and_si128(GA_MASK_SSE3, c1); - - return _mm_add_epi32(c0, c1); -} - -static EFL_ALWAYS_INLINE __m128i -mul4_sym_sse3(__m128i x, __m128i y) { - - const __m128i zero = _mm_setzero_si128(); - - __m128i x_l = _mm_unpacklo_epi8(x, zero); - __m128i x_h = _mm_unpackhi_epi8(x, zero); - - __m128i y_l = _mm_unpacklo_epi8(y, zero); - __m128i y_h = _mm_unpackhi_epi8(y, zero); - - __m128i r_l = _mm_mullo_epi16(x_l, y_l); - __m128i r_h = _mm_mullo_epi16(x_h, y_h); - - r_l = _mm_add_epi16(r_l, SYM4_MASK_SSE3); - r_h = _mm_add_epi16(r_h, SYM4_MASK_SSE3); - - r_l = _mm_srli_epi16(r_l, 8); - r_h = _mm_srli_epi16(r_h, 8); - - return _mm_packus_epi16(r_l, r_h); -} - -static EFL_ALWAYS_INLINE __m128i -mul3_sym_sse3(__m128i x, __m128i y) { - - __m128i res = mul4_sym_sse3(x, y); - return _mm_and_si128(res, RGB_MASK_SSE3); -} - -#define LOOP_ALIGNED_U1_A48_SSE3(DEST, LENGTH, UOP, A4OP, A8OP) \ - { \ - while((uintptr_t)DEST & 0xF && LENGTH) UOP \ - \ - while(LENGTH) { \ - switch(LENGTH) { \ - case 3: UOP \ - case 2: UOP \ - case 1: UOP \ - break; \ - case 7: \ - case 6: \ - case 5: \ - case 4: \ - A4OP \ - break; \ - default: \ - A8OP \ - break; \ - } \ - } \ - } - - -#endif -#endif - -#endif diff --git a/libraries/evas/src/lib/include/evas_common.h b/libraries/evas/src/lib/include/evas_common.h deleted file mode 100644 index e853064..0000000 --- a/libraries/evas/src/lib/include/evas_common.h +++ /dev/null @@ -1,1258 +0,0 @@ -#ifndef EVAS_COMMON_H -#define EVAS_COMMON_H - -//#ifdef HAVE_CONFIG_H -#include "config.h" /* so that EAPI in Evas.h is correctly defined */ -//#endif - -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_ALLOCA_H -# include -#elif !defined alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _AIX -# define alloca __alloca -# elif defined _MSC_VER -# include -# define alloca _alloca -# elif !defined HAVE_ALLOCA -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -# endif -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifndef _MSC_VER -# include -#include -#endif - -#ifdef HAVE_EVIL -# include -#endif - -#ifdef HAVE_ESCAPE -# include -#endif - -#ifdef HAVE_PIXMAN -#include -#endif - -#include -#include -#include - -#ifdef HAVE_EXOTIC -# include -#endif - -#include -#include "Evas.h" -//#include "Evas_GL.h" - -#ifndef HAVE_LROUND -/* right now i dont care about rendering bugs on platforms without lround - (e.g. windows/vc++... yay!) - FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487 -*/ -#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5)) -#endif - -/* macros needed to log message through eina_log */ -extern EAPI int _evas_log_dom_global; -#ifdef _EVAS_DEFAULT_LOG_DOM -# undef _EVAS_DEFAULT_LOG_DOM -#endif -#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global - -#ifdef EVAS_DEFAULT_LOG_COLOR -# undef EVAS_DEFAULT_LOG_COLOR -#endif -#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE - -#ifdef ERR -# undef ERR -#endif -#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) - -#ifdef DBG -# undef DBG -#endif -#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) - -#ifdef INF -# undef INF -#endif -#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) - -#ifdef WRN -# undef WRN -#endif -#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) - -#ifdef CRIT -# undef CRIT -#endif -#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) - -#include "evas_options.h" - -#if defined(__ARM_ARCH_3M__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4T__) -# define __ARM_ARCH__ 41 -#endif - -#if defined(__ARM_ARCH_5__) -# define __ARM_ARCH__ 50 -#endif -#if defined(__ARM_ARCH_5T__) -# define __ARM_ARCH__ 51 -#endif -#if defined(__ARM_ARCH_5E__) -# define __ARM_ARCH__ 52 -#endif -#if defined(__ARM_ARCH_5TE__) -# define __ARM_ARCH__ 53 -#endif -#if defined(__ARM_ARCH_5TEJ__) -# define __ARM_ARCH__ 54 -#endif - -#if defined(__ARM_ARCH_6__) -# define __ARM_ARCH__ 60 -#endif -#if defined(__ARM_ARCH_6J__) -# define __ARM_ARCH__ 61 -#endif -#if defined(__ARM_ARCH_6K__) -# define __ARM_ARCH__ 62 -#endif -#if defined(__ARM_ARCH_6Z__) -# define __ARM_ARCH__ 63 -#endif -#if defined(__ARM_ARCH_6ZK__) -# define __ARM_ARCH__ 64 -#endif -#if defined(__ARM_ARCH_6T2__) -# define __ARM_ARCH__ 65 -#endif - -#if defined(__ARM_ARCH_7__) -# define __ARM_ARCH__ 70 -#endif -#if defined(__ARM_ARCH_7A__) -# define __ARM_ARCH__ 71 -#endif -#if defined(__ARM_ARCH_7R__) -# define __ARM_ARCH__ 72 -#endif -#if defined(__ARM_ARCH_7M__) -# define __ARM_ARCH__ 73 -#endif - -#ifndef BUILD_PTHREAD -# undef BUILD_PIPE_RENDER -#endif - -#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD) -# define BUILD_PTHREAD -#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)) - -/* for rwlocks */ -#define RWLK(x) Eina_RWLock x -#define RWLKI(x) eina_rwlock_new(&(x)) -#define RWLKD(x) eina_rwlock_free(&(x)) -#define RDLKL(x) eina_rwlock_take_read(&(x)) -#define WRLKL(x) eina_rwlock_take_write(&(x)) -#define RWLKU(x) eina_rwlock_release(&(x)) - -#ifdef BUILD_PTHREAD - -# define TH(x) pthread_t x -# define THI(x) int x -# define TH_MAX 8 - -// even though in theory having every Nth rendered line done by a different -// thread might even out load across threads - it actually slows things down. -//#define EVAS_SLI 1 - -#else -# define TH(x) -# define THI(x) -# define TH_MAX 0 - -#endif - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H -#include FT_SIZES_H -#include FT_MODULE_H - -#ifdef __GNUC__ -# if __GNUC__ >= 4 -// BROKEN in gcc 4 on amd64 -//# pragma GCC visibility push(hidden) -# endif -#define LIKELY(x) __builtin_expect(!!(x), 1) -#define UNLIKELY(x) __builtin_expect(!!(x), 0) -#else -#define LIKELY(x) (x) -#define UNLIKELY(x) (x) -#endif - -/*****************************************************************************/ - -/* use exact rects for updates not tiles */ -/* #define RECTUPDATE */ -#define TILESIZE 8 -#define IMG_MAX_SIZE 65000 - -#define IMG_TOO_BIG(w, h) \ - ((((unsigned long long)w) * ((unsigned long long)h)) >= \ - ((1ULL << (29 * (sizeof(void *) / 4))) - 2048)) - -#ifdef BUILD_SMALL_DITHER_MASK -# define DM_TABLE _evas_dither_44 -# define DM_SIZE 4 -# define DM_BITS 4 -# define DM_DIV 16 -# define USE_DITHER_44 1 -#else -# define DM_TABLE _evas_dither_128128 -# define DM_SIZE 128 -# define DM_BITS 6 -# define DM_DIV 64 -# define USE_DITHER_128128 1 -#endif - -#define DM_MSK (DM_SIZE - 1) -#define DM_SHF(_b) (DM_BITS - (8 - _b)) -/* Supports negative right shifts */ -#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \ - ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b))) - -/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse - * alpha flag gets set */ -#define ALPHA_SPARSE_INV_FRACTION 3 - -/*****************************************************************************/ - -#if defined(__ARM_ARCH_3M__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4T__) -# define __ARM_ARCH__ 41 -#endif - -#if defined(__ARM_ARCH_5__) -# define __ARM_ARCH__ 50 -#endif -#if defined(__ARM_ARCH_5T__) -# define __ARM_ARCH__ 51 -#endif -#if defined(__ARM_ARCH_5E__) -# define __ARM_ARCH__ 52 -#endif -#if defined(__ARM_ARCH_5TE__) -# define __ARM_ARCH__ 53 -#endif -#if defined(__ARM_ARCH_5TEJ__) -# define __ARM_ARCH__ 54 -#endif - -#if defined(__ARM_ARCH_6__) -# define __ARM_ARCH__ 60 -#endif -#if defined(__ARM_ARCH_6J__) -# define __ARM_ARCH__ 61 -#endif -#if defined(__ARM_ARCH_6K__) -# define __ARM_ARCH__ 62 -#endif -#if defined(__ARM_ARCH_6Z__) -# define __ARM_ARCH__ 63 -#endif -#if defined(__ARM_ARCH_6ZK__) -# define __ARM_ARCH__ 64 -#endif -#if defined(__ARM_ARCH_6T2__) -# define __ARM_ARCH__ 65 -#endif - -#if defined(__ARM_ARCH_7__) -# define __ARM_ARCH__ 70 -#endif -#if defined(__ARM_ARCH_7A__) -# define __ARM_ARCH__ 71 -#endif -#if defined(__ARM_ARCH_7R__) -# define __ARM_ARCH__ 72 -#endif -#if defined(__ARM_ARCH_7M__) -# define __ARM_ARCH__ 73 -#endif - -#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) -/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ -#define pld(addr, off) \ - __asm__("pld [%[address], %[offset]]":: \ - [address] "r" (addr), [offset] "i" (off)) -#else -#define pld(addr, off) -#endif /* __ARMEL__ */ - -// these here are in config.h - just here for documentation -//#ifdef __ARM_ARCH__ -// *IF* you enable pixman, this determines which things pixman will do -////#define PIXMAN_FONT 1 -////#define PIXMAN_RECT 1 -////#define PIXMAN_LINE 1 -////#define PIXMAN_POLY 1 -//#define PIXMAN_IMAGE 1 -//#define PIXMAN_IMAGE_SCALE_SAMPLE 1 -//#endif -// not related to pixman but an alternate rotate code -//#define TILE_ROTATE 1 - -#define TILE_CACHE_LINE_SIZE 64 - -/*****************************************************************************/ - -#define UNROLL2(op...) op op -#define UNROLL4(op...) UNROLL2(op) UNROLL2(op) -#define UNROLL8(op...) UNROLL4(op) UNROLL4(op) -#define UNROLL16(op...) UNROLL8(op) UNROLL8(op) - -#define UNROLL8_PLD_WHILE(start, size, end, op) \ - pld(start, 0); \ - end = start + (size & ~7); \ - while (start < end) \ - { \ - pld(start, 32); \ - UNROLL8(op); \ - } \ - end += (size & 7); \ - pld(start, 32); \ - while (start < end) \ - { \ - op; \ - } - -/*****************************************************************************/ - -typedef unsigned long long DATA64; -typedef unsigned int DATA32; -typedef unsigned short DATA16; -typedef unsigned char DATA8; - -typedef struct _Image_Entry Image_Entry; -typedef struct _Image_Entry_Flags Image_Entry_Flags; -typedef struct _Image_Entry_Frame Image_Entry_Frame; -typedef struct _Image_Timestamp Image_Timestamp; -typedef struct _Engine_Image_Entry Engine_Image_Entry; -typedef struct _Evas_Cache_Target Evas_Cache_Target; -typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; - -typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts; -#ifdef BUILD_PIPE_RENDER -typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; -typedef struct _RGBA_Pipe RGBA_Pipe; -typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info; -#endif -typedef struct _RGBA_Image RGBA_Image; -typedef struct _RGBA_Image_Span RGBA_Image_Span; -typedef struct _RGBA_Draw_Context RGBA_Draw_Context; -typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point; -typedef struct _RGBA_Map_Point RGBA_Map_Point; -typedef struct _RGBA_Font RGBA_Font; -typedef struct _RGBA_Font_Int RGBA_Font_Int; -typedef struct _RGBA_Font_Source RGBA_Font_Source; -typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph; -typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor; - -typedef struct _Cutout_Rect Cutout_Rect; -typedef struct _Cutout_Rects Cutout_Rects; - -typedef struct _Convert_Pal Convert_Pal; - -typedef struct _Tilebuf Tilebuf; -typedef struct _Tilebuf_Tile Tilebuf_Tile; -typedef struct _Tilebuf_Rect Tilebuf_Rect; - -typedef struct _Evas_Common_Transform Evas_Common_Transform; - -// RGBA_Map_Point -// all coords are 20.12 -// fp type - an int for now -typedef int FPc; -// fp # of bits of float accuracy -#define FP 8 -// fp half (half of an fp unit) -#define FPH (1 << (FP - 1)) -// one fp unit -#define FP1 (1 << (FP)) - -/* -typedef struct _Regionbuf Regionbuf; -typedef struct _Regionspan Regionspan; -*/ - -typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len); -typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst); -typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len); - -typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); - -#include "../cache/evas_cache.h" - -/*****************************************************************************/ - -typedef enum _RGBA_Image_Flags -{ - RGBA_IMAGE_NOTHING = (0), -/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */ - RGBA_IMAGE_IS_DIRTY = (1 << 1), - RGBA_IMAGE_INDEXED = (1 << 2), - RGBA_IMAGE_ALPHA_ONLY = (1 << 3), - RGBA_IMAGE_ALPHA_TILES = (1 << 4), -/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */ -/* RGBA_IMAGE_LOADED = (1 << 6), */ -/* RGBA_IMAGE_NEED_DATA = (1 << 7) */ - RGBA_IMAGE_TODO_LOAD = (1 << 8), -} RGBA_Image_Flags; - -typedef enum _Convert_Pal_Mode -{ - PAL_MODE_NONE, - PAL_MODE_MONO, - PAL_MODE_GRAY4, - PAL_MODE_GRAY16, - PAL_MODE_GRAY64, - PAL_MODE_GRAY256, - PAL_MODE_RGB111, - PAL_MODE_RGB121, - PAL_MODE_RGB221, - PAL_MODE_RGB222, - PAL_MODE_RGB232, - PAL_MODE_RGB332, - PAL_MODE_RGB666, - PAL_MODE_LAST -} Convert_Pal_Mode; - -typedef enum _CPU_Features -{ - CPU_FEATURE_C = 0, - CPU_FEATURE_MMX = (1 << 0), - CPU_FEATURE_MMX2 = (1 << 1), - CPU_FEATURE_SSE = (1 << 2), - CPU_FEATURE_ALTIVEC = (1 << 3), - CPU_FEATURE_VIS = (1 << 4), - CPU_FEATURE_VIS2 = (1 << 5), - CPU_FEATURE_NEON = (1 << 6), - CPU_FEATURE_SSE3 = (1 << 7) -} CPU_Features; - -typedef enum _Font_Hint_Flags -{ - FONT_NO_HINT, - FONT_AUTO_HINT, - FONT_BYTECODE_HINT -} Font_Hint_Flags; - -typedef enum _Font_Rend_Flags -{ - FONT_REND_REGULAR = 0, - FONT_REND_SLANT = (1 << 0), - FONT_REND_WEIGHT = (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 - double dpi; // if > 0.0 use this - unsigned int w, h; // if > 0 use this - unsigned int degree;//if>0 there is some info related with rotation - 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 -{ - Eina_Bool loaded : 1; - Eina_Bool in_progress : 1; - Eina_Bool dirty : 1; - Eina_Bool activ : 1; - - Eina_Bool need_data : 1; - Eina_Bool lru_nodata : 1; - Eina_Bool cached : 1; - Eina_Bool alpha : 1; - - Eina_Bool lru : 1; - Eina_Bool alpha_sparse : 1; -#ifdef BUILD_ASYNC_PRELOAD - Eina_Bool preload_done : 1; - Eina_Bool delete_me : 1; - Eina_Bool pending : 1; -#endif - Eina_Bool animated : 1; - Eina_Bool rotated : 1; -}; - -struct _Image_Entry_Frame -{ - int index; - DATA32 *data; /* frame decoding data */ - void *info; /* special image type info */ - Eina_Bool loaded : 1; -}; - -struct _Evas_Cache_Target -{ - EINA_INLIST; - const void *target; - void *data; -}; - -struct _Image_Timestamp -{ - time_t mtime; - off_t size; - ino_t ino; -#ifdef _STAT_VER_LINUX - unsigned long int mtime_nsec; -#endif -}; - -struct _Image_Entry -{ - EINA_INLIST; - - Evas_Cache_Image *cache; - - const char *cache_key; - - const char *file; - const char *key; - - Evas_Cache_Target *targets; - Evas_Preload_Pthread *preload; - - Image_Timestamp tstamp; - - int references; -#ifdef EVAS_FRAME_QUEUING - LK(lock_references); // needed for accessing references -#endif - -#ifdef BUILD_PIPE_RENDER - RGBA_Pipe *pipe; -#ifdef EVAS_FRAME_QUEUING - LK(ref_fq_add); - LK(ref_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 - - unsigned char scale; - - RGBA_Image_Loadopts load_opts; - int space; - unsigned int w; - unsigned int h; - - struct - { - unsigned int w; - unsigned int h; - } allocated; - - struct - { - void *module; - void *loader; - } info; - -#ifdef BUILD_ASYNC_PRELOAD - LK(lock); - LK(lock_cancel); - Eina_Bool unload_cancel : 1; -#endif - - Image_Entry_Flags flags; - Evas_Image_Scale_Hint scale_hint; - void *data1, *data2; - int server_id; - int connect_num; - int channel; - int load_error; - - /* for animation feature */ - int frame_count; - Evas_Image_Animated_Loop_Hint loop_hint; - int loop_count; - int cur_frame; - Eina_List *frames; -}; - -struct _Engine_Image_Entry -{ - EINA_INLIST; - - /* Upper Engine data. */ - Image_Entry *src; - - /* Cache stuff. */ - Evas_Cache_Engine_Image *cache; - const char *cache_key; - - struct - { - Eina_Bool cached : 1; - Eina_Bool activ : 1; - Eina_Bool dirty : 1; - Eina_Bool loaded : 1; - Eina_Bool need_parent : 1; - } flags; - - int references; - int w; - int h; -}; - -struct _Cutout_Rect -{ - int x, y, w, h; -}; - -struct _Cutout_Rects -{ - Cutout_Rect* rects; - int active; - int max; -}; - -struct _Evas_Common_Transform -{ - float mxx, mxy, mxz; - float myx, myy, myz; - float mzx, mzy, mzz; -}; - -struct _RGBA_Draw_Context -{ - struct { - Eina_Bool use : 1; - DATA32 col; - } mul; - struct { -#ifdef HAVE_PIXMAN - pixman_image_t *pixman_color_image; -#endif - DATA32 col; - } col; - struct RGBA_Draw_Context_clip { - int x, y, w, h; - Eina_Bool use : 1; - } clip; - struct { - int x, y, w, h; - RGBA_Image *mask; - } mask; - Cutout_Rects cutout; - struct { - struct { - void *(*gl_new) (void *data, RGBA_Font_Glyph *fg); - void (*gl_free) (void *ext_dat); - void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); - } func; - void *data; - } font_ext; - struct { - int color_space; - } interpolation; - struct { - int y, h; - } sli; - int render_op; - Eina_Bool anti_alias : 1; -}; - -#ifdef BUILD_PIPE_RENDER -#include "../engines/common/evas_map_image.h" -#include "../engines/common/evas_text_utils.h" - -struct _RGBA_Pipe_Op -{ - RGBA_Draw_Context context; - void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info); - void (*free_func) (RGBA_Pipe_Op *op); - - union { - struct { - int x, y, w, h; - } rect; - struct { - int x0, y0, x1, y1; - } line; - struct { - RGBA_Polygon_Point *points; - } poly; - struct { - RGBA_Font *font; - int x, y; - Evas_Text_Props intl_props; - } text; - struct { - RGBA_Image *src; - int sx, sy, sw, sh, dx, dy, dw, dh; - int smooth; - char *text; - } image; - struct { - RGBA_Image *src; - RGBA_Map_Point *p; - int npoints; - int smooth; - int level; - } map; - } op; -}; - -#define PIPE_LEN 256 - -struct _RGBA_Pipe -{ - EINA_INLIST; - int op_num; - RGBA_Pipe_Op op[PIPE_LEN]; -}; - -struct _RGBA_Pipe_Thread_Info -{ - RGBA_Image *im; - int x, y, w, h; -}; -#endif - -struct _RGBA_Image -{ - Image_Entry cache_entry; - - RGBA_Image_Flags flags; - struct - { -/* void *module; */ -/* void *loader; */ -/* char *real_file; */ - char *comment; -// int format; - } info; - - void *extended_info; - int ref; - -/* unsigned char scale; */ - - /* Colorspace stuff. */ - struct { - void *data; - Eina_Bool no_free : 1; - Eina_Bool dirty : 1; - } cs; - - /* RGBA stuff */ - struct { - DATA32 *data; - Eina_Bool no_free : 1; - } image; - - struct { - DATA8 *mask; - Eina_Bool dirty: 1; - } mask; - -#if 0 // filtering disabled - Eina_List *filtered; -#endif - - struct { - LK(lock); - Eina_List *list; - unsigned long long orig_usage; - unsigned long long usage_count; - int populate_count; - 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 -{ - EINA_INLIST; - int x, y; -}; - -struct _RGBA_Map_Point -{ - FPc x, y; // x, y screenspace - float fx, fy, fz; // x, y, z in floats -// FPc x3, y3; // x, y 3d space - FPc z; // z in world space. optional - FPc u, v; // u, v in tex coords - DATA32 col; // color at this point - // for perspective correctness - only point 0 has relevant info - 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; -typedef struct _Fash_Int_Map Fash_Int_Map; -typedef struct _Fash_Int_Map2 Fash_Int_Map2; -typedef struct _Fash_Int Fash_Int; -struct _Fash_Item_Index_Map -{ - RGBA_Font_Int *fint; - int index; -}; -struct _Fash_Int_Map -{ - Fash_Item_Index_Map item[256]; -}; -struct _Fash_Int_Map2 -{ - Fash_Int_Map *bucket[256]; -}; -struct _Fash_Int -{ - Fash_Int_Map2 *bucket[256]; - void (*freeme) (Fash_Int *fash); -}; - -///// -typedef struct _Fash_Glyph_Map Fash_Glyph_Map; -typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2; -typedef struct _Fash_Glyph Fash_Glyph; -struct _Fash_Glyph_Map -{ - RGBA_Font_Glyph *item[256]; -}; -struct _Fash_Glyph_Map2 -{ - Fash_Glyph_Map *bucket[256]; -}; -struct _Fash_Glyph -{ - Fash_Glyph_Map2 *bucket[256]; - void (*freeme) (Fash_Glyph *fash); -}; -///// - -struct _RGBA_Font -{ - Eina_List *fonts; - Fash_Int *fash; - Font_Hint_Flags hinting; - int references; -#ifdef EVAS_FRAME_QUEUING - int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion - Eina_Condition cond_fq_del; - LK(ref_fq_add); - LK(ref_fq_del); -#endif - LK(lock); - unsigned char sizeok : 1; -}; - -#include "../engines/common/evas_font_ot.h" - -struct _RGBA_Font_Int -{ - EINA_INLIST; - RGBA_Font_Source *src; - Eina_Hash *kerning; - Fash_Glyph *fash; - unsigned int size; - int real_size; - int max_h; - int references; - int usage; - struct { - FT_Size size; -#ifdef USE_HARFBUZZ - void *hb_font; -#endif - } 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; -}; - -struct _RGBA_Font_Source -{ - const char *name; - const char *file; - void *data; - unsigned int current_size; - int data_size; - int references; - struct { - int orig_upem; - FT_Face face; - } ft; -}; - -struct _RGBA_Font_Glyph -{ - FT_UInt index; - FT_Glyph glyph; - FT_BitmapGlyph glyph_out; - /* this is a problem - only 1 engine at a time can extend such a font... grrr */ - void *ext_dat; - void (*ext_dat_free) (void *ext_dat); - RGBA_Font_Int *fi; -}; - -struct _RGBA_Gfx_Compositor -{ - const char *name; - - void (*init)(void); - void (*shutdown)(void); - - RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); - RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); - RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); - RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); - RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); - - RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); -}; - -#define EVAS_RECT_SPLIT 1 -#ifdef EVAS_RECT_SPLIT -typedef struct list_node list_node_t; -typedef struct list list_t; -typedef struct rect rect_t; -typedef struct rect_node rect_node_t; - -struct list_node -{ - struct list_node *next; -}; - -struct list -{ - struct list_node *head; - struct list_node *tail; -}; - -struct rect -{ - int left; - int top; - int right; - int bottom; - int width; - int height; - int area; -}; - -struct rect_node -{ - struct list_node _lst; - struct rect rect; -}; -#endif /* EVAS_RECT_SPLIT */ - -struct _Tilebuf -{ - int outbuf_w; - int outbuf_h; - - struct { - int w, h; - } tile_size; - - struct { - int x, y, w, h; - } prev_add, prev_del; -#ifdef RECTUPDATE -/* - Regionbuf *rb; - */ -#elif defined(EVAS_RECT_SPLIT) - int need_merge; - list_t rects; -#else -/* - struct { - int w, h; - Tilebuf_Tile *tiles; - } tiles; - */ -#endif -}; - -struct _Tilebuf_Tile -{ - Eina_Bool redraw : 1; -/* FIXME: need these flags later - but not now */ -/* - Eina_Bool done : 1; - Eina_Bool edge : 1; - Eina_Bool from : 1; - - struct { - int dx, dy; - } vector; - */ -}; - -struct _Tilebuf_Rect -{ - EINA_INLIST; - int x, y, w, h; -}; -/* -struct _Regionbuf -{ - int w, h; - Regionspan **spans; -}; - -struct _Regionspan -{ - EINA_INLIST; - int x1, x2; -}; -*/ - -struct _Convert_Pal -{ - int references; - int count; - Convert_Pal_Mode colors; - DATA8 *lookup; - void *data; -}; - -/****/ - -/*****************************************************************************/ -#include "evas_macros.h" - -#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 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 AR_VAL(p) ((DATA16 *)(p)[0]) -#define GB_VAL(p) ((DATA16 *)(p)[1]) -#endif - -#define RGB_JOIN(r,g,b) \ - (((r) << 16) + ((g) << 8) + (b)) - -#define ARGB_JOIN(a,r,g,b) \ - (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) - -#include "evas_blend_ops.h" - -#define _EVAS_RENDER_FILL -1 -#define _EVAS_RENDER_BLEND 0 -#define _EVAS_RENDER_BLEND_REL 1 -#define _EVAS_RENDER_COPY 2 -#define _EVAS_RENDER_COPY_REL 3 -#define _EVAS_RENDER_ADD 4 -#define _EVAS_RENDER_ADD_REL 5 -#define _EVAS_RENDER_SUB 6 -#define _EVAS_RENDER_SUB_REL 7 -#define _EVAS_RENDER_TINT 8 -#define _EVAS_RENDER_TINT_REL 9 -#define _EVAS_RENDER_MASK 10 -#define _EVAS_RENDER_MUL 11 -#define _EVAS_RENDER_CLIP 12 - -#define _EVAS_TEXTURE_REFLECT 0 -#define _EVAS_TEXTURE_REPEAT 1 -#define _EVAS_TEXTURE_RESTRICT 2 -#define _EVAS_TEXTURE_RESTRICT_REFLECT 3 -#define _EVAS_TEXTURE_RESTRICT_REPEAT 4 -#define _EVAS_TEXTURE_PAD 5 - -#define _EVAS_COLOR_SPACE_ARGB 0 -#define _EVAS_COLOR_SPACE_AHSV 1 - -/*****************************************************************************/ - -#define SCALE_SIZE_MAX ((1 << 15) - 1) - -#ifdef __cplusplus -extern "C" { -#endif - -/****/ -void evas_common_init (void); -void evas_common_shutdown (void); - -EAPI void evas_common_cpu_init (void); - -int evas_common_cpu_have_cpuid (void); -int evas_common_cpu_has_feature (unsigned int feature); -EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2); -EAPI void evas_common_cpu_end_opt (void); - -/****/ -#include "../engines/common/evas_blend.h" - -EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse); - -/****/ -#include "../engines/common/evas_convert_color.h" -#include "../engines/common/evas_convert_colorspace.h" -#include "../engines/common/evas_convert_main.h" -#include "../engines/common/evas_convert_yuv.h" -#include "../engines/common/evas_scale_main.h" -#include "../engines/common/evas_scale_smooth.h" -#include "../engines/common/evas_scale_span.h" - -/****/ -#include "../engines/common/evas_image.h" - -/****/ -#include "../engines/common/evas_line.h" -#include "../engines/common/evas_polygon.h" -#include "../engines/common/evas_rectangle.h" - -/****/ -EAPI void evas_common_blit_init (void); - -EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y); - -/****/ -#include "../engines/common/evas_font.h" - -/****/ -EAPI void evas_common_tilebuf_init (void); - -EAPI Tilebuf *evas_common_tilebuf_new (int w, int h); -EAPI void evas_common_tilebuf_free (Tilebuf *tb); -EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th); -EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th); -EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h); -EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h); -EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha); -EAPI void evas_common_tilebuf_clear (Tilebuf *tb); -EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb); -EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects); - -/* -Regionbuf *evas_common_regionbuf_new (int w, int h); -void evas_common_regionbuf_free (Regionbuf *rb); -void evas_common_regionbuf_clear (Regionbuf *rb); -void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y); -void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y); -Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb); -*/ - -/****/ -#include "../engines/common/evas_draw.h" - -#include "../engines/common/evas_map_image.h" - -/****/ -#ifdef BUILD_PIPE_RENDER -# include "../engines/common/evas_pipe.h" -#endif - -void evas_font_dir_cache_free(void); - -/****/ - -/*****************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libraries/evas/src/lib/include/evas_common_soft16.h b/libraries/evas/src/lib/include/evas_common_soft16.h deleted file mode 100644 index 446319e..0000000 --- a/libraries/evas/src/lib/include/evas_common_soft16.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef EVAS_COMMON_SOFT16_H -#define EVAS_COMMON_SOFT16_H - -#include "evas_common.h" -#include "evas_private.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define RGB_565_UNPACKED_MASK 0x07e0f81f -#define RGB_565_UNPACK(rgb) \ - (((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK) -#define RGB_565_PACK(rgb) \ - ((((rgb) & RGB_565_UNPACKED_MASK) | \ - ((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0xffff) -#define RGB_565_UNPACKED_BLEND(a, b, alpha) \ - ((b) + (a) - ((((b) * (alpha)) >> 5) & RGB_565_UNPACKED_MASK)) -#define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha) \ - ((b) + ((((a) - (b)) * (alpha)) >> 5)) - -#define RGB_565_FROM_COMPONENTS(r, g, b) \ - (((((r) >> 3) & 0x1f) << 11) | \ - ((((g) >> 2) & 0x3f) << 5) | \ - (((b) >> 3) & 0x1f)) - -static inline unsigned int -_calc_stride(unsigned int w) -{ - unsigned int pad = w % 4; - if (!pad) return w; - else return w + 4 - pad; -} - -#define IMG_BYTE_SIZE(stride, height, has_alpha) \ - ((stride) * (height) * (!(has_alpha) ? 2 : 3)) - -typedef struct _Soft16_Image Soft16_Image; -struct _Soft16_Image -{ - Image_Entry cache_entry; - - RGBA_Image *source; - - int stride; // pixel stride - likely a multiple of 2 - DATA16 *pixels; // 16bpp pixels rgb565 - DATA8 *alpha; // 8bit alpha mask - optional. points into pixels - - struct - { -/* unsigned char have_alpha : 1; // 1 if we have halpha */ - unsigned char free_pixels : 1; // 1 if pixels should be freed - unsigned char free_alpha : 1; // 1 if alpha mask should be freed - } flags; -}; - -/** - * Image (evas_soft16_main.c) - */ -EAPI void evas_common_soft16_image_init(void); -EAPI void evas_common_soft16_image_shutdown(void); -EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void); - -EAPI void evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, 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, int smooth); -EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha); - -void evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); -void evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); - -/* convert/dither functions */ -void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src); -void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src); - -/** - * Rectangle (evas_soft16_rectangle.c) - */ -EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); - -/** - * Polygon (evas_soft16_polygon.c) - */ - EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); - -/** - * Line (evas_soft16_line.c) - */ -EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); - -/** - * Font (evas_soft16_font.c) - */ -EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg); -EAPI void evas_common_soft16_font_glyph_free(void *ext_dat); -EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libraries/evas/src/lib/include/evas_common_soft8.h b/libraries/evas/src/lib/include/evas_common_soft8.h deleted file mode 100644 index d701842..0000000 --- a/libraries/evas/src/lib/include/evas_common_soft8.h +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef EVAS_COMMON_SOFT8_H -#define EVAS_COMMON_SOFT8_H - -#include "evas_common.h" -#include "evas_private.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define GRY_8_BLEND(a, b, alpha) \ - ((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff)) - -#define GRY_8_BLEND_UNMUL(a, b, alpha) \ - ((b) + ((((a) - (b)) * ((alpha) + 1)) >> 8)) - -#if 0 -#define GRY_8_FROM_COMPONENTS(r, g, b) \ - (((307 * (r)) + \ - (604 * (g)) + \ - (113 * (b))) >> 10) - -#define GRY_8_FROM_RGB(rgb) \ - GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) -#endif - -//Y = R * 0.2126 + G * 0.7152 + B * 0.0722 - -#define GRY_8_FROM_COMPONENTS(r, g, b) \ - (((218 * (r)) + \ - (732 * (g)) + \ - (74 * (b))) >> 10) - -#define GRY_8_FROM_RGB(rgb) \ - GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) - -#define UNROLL2(op...) op op -#define UNROLL4(op...) UNROLL2(op) UNROLL2(op) -#define UNROLL8(op...) UNROLL4(op) UNROLL4(op) -#define UNROLL16(op...) UNROLL8(op) UNROLL8(op) - -#if defined(__ARM_ARCH_3M__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4__) -# define __ARM_ARCH__ 40 -#endif -#if defined(__ARM_ARCH_4T__) -# define __ARM_ARCH__ 41 -#endif - -#if defined(__ARM_ARCH_5__) -# define __ARM_ARCH__ 50 -#endif -#if defined(__ARM_ARCH_5T__) -# define __ARM_ARCH__ 51 -#endif -#if defined(__ARM_ARCH_5E__) -# define __ARM_ARCH__ 52 -#endif -#if defined(__ARM_ARCH_5TE__) -# define __ARM_ARCH__ 53 -#endif -#if defined(__ARM_ARCH_5TEJ__) -# define __ARM_ARCH__ 54 -#endif - -#if defined(__ARM_ARCH_6__) -# define __ARM_ARCH__ 60 -#endif -#if defined(__ARM_ARCH_6J__) -# define __ARM_ARCH__ 61 -#endif -#if defined(__ARM_ARCH_6K__) -# define __ARM_ARCH__ 62 -#endif -#if defined(__ARM_ARCH_6Z__) -# define __ARM_ARCH__ 63 -#endif -#if defined(__ARM_ARCH_6ZK__) -# define __ARM_ARCH__ 64 -#endif -#if defined(__ARM_ARCH_6T2__) -# define __ARM_ARCH__ 65 -#endif - -#if defined(__ARM_ARCH_7__) -# define __ARM_ARCH__ 70 -#endif -#if defined(__ARM_ARCH_7A__) -# define __ARM_ARCH__ 71 -#endif -#if defined(__ARM_ARCH_7R__) -# define __ARM_ARCH__ 72 -#endif -#if defined(__ARM_ARCH_7M__) -# define __ARM_ARCH__ 73 -#endif - -#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) -/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ -#define pld(addr, off) \ - __asm__("pld [%[address], %[offset]]":: \ - [address] "r" (addr), [offset] "i" (off)) -#else -#define pld(addr, off) -#endif /* __ARMEL__ */ - -static inline unsigned int -_calc_stride(unsigned int w) -{ - unsigned int pad = w % 4; - if (!pad) return w; - else return w + 4 - pad; -} - -#define IMG_BYTE_SIZE(stride, height, has_alpha) \ - ((stride) * (height) * (!(has_alpha) ? 1 : 2)) - -typedef struct _Soft8_Image Soft8_Image; -struct _Soft8_Image -{ - Image_Entry cache_entry; - - RGBA_Image *source; - - int stride; // pixel stride - DATA8 *pixels; // 8bpp pixels gry8 - DATA8 *alpha; // 8bit alpha mask - optional. points into pixels - - void *extended_info; - - struct - { -/* unsigned char have_alpha : 1; // 1 if we have halpha */ - unsigned char free_pixels : 1; // 1 if pixels should be freed - unsigned char free_alpha : 1; // 1 if alpha mask should be freed - } flags; -}; - -/** - * Image (evas_soft8_main.c) - */ -EAPI void evas_common_soft8_image_init(void); -EAPI void evas_common_soft8_image_shutdown(void); -EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void); - -EAPI void evas_common_soft8_image_draw(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, 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, int smooth); -EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha); - -void evas_common_soft8_image_draw_unscaled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); -void evas_common_soft8_image_draw_scaled_sampled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr); - -/* convert/dither functions */ -void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src); -void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src); - -/** - * Rectangle (evas_soft8_rectangle.c) - */ -EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); - -/** - * Polygon (evas_soft8_polygon.c) - */ -EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); - -/** - * Line (evas_soft8_line.c) - */ -EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); - -/** - * Font (evas_soft8_font.c) - */ -EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg); -EAPI void evas_common_soft8_font_glyph_free(void *ext_dat); -EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libraries/evas/src/lib/include/evas_inline.x b/libraries/evas/src/lib/include/evas_inline.x deleted file mode 100644 index 45f2b1f..0000000 --- a/libraries/evas/src/lib/include/evas_inline.x +++ /dev/null @@ -1,259 +0,0 @@ -#ifndef EVAS_INLINE_H -#define EVAS_INLINE_H - -static inline void -_evas_object_event_new(void) -{ - _evas_event_counter++; -} - -static inline int -evas_object_was_visible(Evas_Object *obj) -{ - if ((obj->prev.visible) && - ((obj->prev.cache.clip.visible) || (obj->smart.smart)) && - ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND) - || obj->prev.render_op != EVAS_RENDER_BLEND)) - { - if (obj->func->was_visible) - return obj->func->was_visible(obj); - return 1; - } - return 0; -} - -static inline void -evas_add_rect(Eina_Array *rects, int x, int y, int w, int h) -{ - Eina_Rectangle *r; - - NEW_RECT(r, x, y, w, h); - if (r) eina_array_push(rects, r); -} - -static inline Cutout_Rect* -evas_common_draw_context_cutouts_add(Cutout_Rects* rects, - int x, int y, int w, int h) -{ - Cutout_Rect* rect; - - if (rects->max < (rects->active + 1)) - { - rects->max += 128; - rects->rects = (Cutout_Rect *)realloc(rects->rects, sizeof(Cutout_Rect) * rects->max); - } - - rect = rects->rects + rects->active; - rect->x = x; - rect->y = y; - rect->w = w; - rect->h = h; - rects->active++; - - return rect; -} - -static inline int -evas_object_is_opaque(Evas_Object *obj) -{ - if (obj->smart.smart) return 0; - /* If a mask: Assume alpha */ - if (obj->cur.mask) return 0; - if (obj->cur.cache.clip.a == 255) - { - if (obj->func->is_opaque) - return obj->func->is_opaque(obj); - return 1; - } - if (obj->cur.render_op == EVAS_RENDER_COPY) - return 1; - return 0; -} - -static inline int -evas_event_freezes_through(Evas_Object *obj) -{ - if (obj->freeze_events) return 1; - if (obj->parent_cache.freeze_events_valid) - return obj->parent_cache.freeze_events; - if (!obj->smart.parent) return 0; - obj->parent_cache.freeze_events = - evas_event_freezes_through(obj->smart.parent); - obj->parent_cache.freeze_events_valid = EINA_TRUE; - return obj->parent_cache.freeze_events; -} - -static inline int -evas_event_passes_through(Evas_Object *obj) -{ - if (obj->pass_events) return 1; - if (obj->parent_cache.pass_events_valid) - return obj->parent_cache.pass_events; - if (!obj->smart.parent) return 0; - obj->parent_cache.pass_events = - evas_event_passes_through(obj->smart.parent); - obj->parent_cache.pass_events_valid = EINA_TRUE; - return obj->parent_cache.pass_events; -} - -static inline int -evas_object_is_visible(Evas_Object *obj) -{ /* post 1.0 -> enable? */ - if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ && - ((obj->cur.cache.clip.visible) || (obj->smart.smart)) && - ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND) - || obj->cur.render_op != EVAS_RENDER_BLEND)) - { - if (obj->func->is_visible) - return obj->func->is_visible(obj); - return 1; - } - return 0; -} - -static inline int -evas_object_clippers_is_visible(Evas_Object *obj) -{ - if (obj->cur.visible) - { - if (obj->cur.clipper) - return evas_object_clippers_is_visible(obj->cur.clipper); - return 1; - } - return 0; -} - -static inline int -evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h) -{ - /* assumes coords have been recalced */ - if ((RECTS_INTERSECT(x, y, w, h, - obj->cur.cache.clip.x, - obj->cur.cache.clip.y, - obj->cur.cache.clip.w, - obj->cur.cache.clip.h))) - return 1; - return 0; -} - -static inline int -evas_object_is_active(Evas_Object *obj) -{ - if (evas_object_is_visible(obj) || evas_object_was_visible(obj)) - { - if (obj->smart.smart) - { - int mapsmt = 0; - if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1; - if (!mapsmt) return 1; - if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, - obj->layer->evas->output.h) || - evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, - obj->layer->evas->output.h)) - return 1; - } - else - { - if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, - obj->layer->evas->output.h) || - evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, - obj->layer->evas->output.h)) - return 1; - } - } - return 0; -} - -static inline void -evas_object_coords_recalc(Evas_Object *obj) -{ -//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity) -//// return; -//// obj->cur.cache.geometry.x = -//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x); -//// obj->cur.cache.geometry.y = -//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y); -//// obj->cur.cache.geometry.w = -//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.w) - -//// evas_coord_world_x_to_screen(obj->layer->evas, 0); -//// obj->cur.cache.geometry.h = -//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) - -//// evas_coord_world_y_to_screen(obj->layer->evas, 0); - if (obj->func->coords_recalc) obj->func->coords_recalc(obj); -//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity; -} - -static inline void -evas_object_clip_recalc(Evas_Object *obj) -{ - int cx, cy, cw, ch, cvis, cr, cg, cb, ca; - int nx, ny, nw, nh, nvis, nr, ng, nb, na; - - if ((!obj->cur.cache.clip.dirty) && - !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty)) - return; - if (obj->layer->evas->events_frozen > 0) return; - evas_object_coords_recalc(obj); - if ((obj->cur.map) && (obj->cur.usemap)) - { - cx = obj->cur.map->normal_geometry.x; - cy = obj->cur.map->normal_geometry.y; - cw = obj->cur.map->normal_geometry.w; - ch = obj->cur.map->normal_geometry.h; - } - else - { - cx = obj->cur.geometry.x; - cy = obj->cur.geometry.y; - cw = obj->cur.geometry.w; - ch = obj->cur.geometry.h; - } -//// cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y; -//// cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h; - if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = 0; - else cvis = obj->cur.visible; - cr = obj->cur.color.r; cg = obj->cur.color.g; - cb = obj->cur.color.b; ca = obj->cur.color.a; - if (obj->cur.clipper) - { -// this causes problems... hmmm ????? - if (obj->cur.clipper->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - - // I don't know why this test was here in the first place. As I have - // no issue showing up due to this, I keep it and move color out of it. -// breaks cliping of mapped images!!! - if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent) - { - nx = obj->cur.clipper->cur.cache.clip.x; - ny = obj->cur.clipper->cur.cache.clip.y; - nw = obj->cur.clipper->cur.cache.clip.w; - nh = obj->cur.clipper->cur.cache.clip.h; - RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh); - } - - nvis = obj->cur.clipper->cur.cache.clip.visible; - nr = obj->cur.clipper->cur.cache.clip.r; - ng = obj->cur.clipper->cur.cache.clip.g; - nb = obj->cur.clipper->cur.cache.clip.b; - na = obj->cur.clipper->cur.cache.clip.a; - cvis = cvis * nvis; - cr = (cr * (nr + 1)) >> 8; - cg = (cg * (ng + 1)) >> 8; - cb = (cb * (nb + 1)) >> 8; - ca = (ca * (na + 1)) >> 8; - } - if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0; - obj->cur.cache.clip.x = cx; - obj->cur.cache.clip.y = cy; - obj->cur.cache.clip.w = cw; - obj->cur.cache.clip.h = ch; - obj->cur.cache.clip.visible = cvis; - obj->cur.cache.clip.r = cr; - obj->cur.cache.clip.g = cg; - obj->cur.cache.clip.b = cb; - obj->cur.cache.clip.a = ca; - obj->cur.cache.clip.dirty = 0; -} - -#endif diff --git a/libraries/evas/src/lib/include/evas_macros.h b/libraries/evas/src/lib/include/evas_macros.h deleted file mode 100644 index ed29dbd..0000000 --- a/libraries/evas/src/lib/include/evas_macros.h +++ /dev/null @@ -1,217 +0,0 @@ -#ifndef EVAS_MACROS_H -#define EVAS_MACROS_H - -#undef ABS -#define ABS(x) (((x) < 0) ? -(x) : (x)) - -#undef SGN -#define SGN(x) (((x) < 0) ? -1 : 1) - -#undef MIN -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) - -#undef MAX -#define MAX(x, y) (((x) > (y)) ? (x) : (y)) - -#define SWAP32(x) (x) = \ - ((((x) & 0x000000ff ) << 24) | \ - (((x) & 0x0000ff00 ) << 8) | \ - (((x) & 0x00ff0000 ) >> 8) | \ - (((x) & 0xff000000 ) >> 24)) - -#define SWAP16(x) (x) = \ - ((((x) & 0x00ff ) << 8) | \ - (((x) & 0xff00 ) >> 8)) - -#define SPANS_COMMON(x1, w1, x2, w2) \ -(!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1))))) - -#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \ -((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh)))) - -#define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ -{ \ - if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \ - { \ - if ((int)_x < (int)(_cx)) \ - { \ - if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \ - else _w += ((int)_x - (int)(_cx)); \ - _x = (_cx); \ - } \ - if ((int)(_x + _w) > (int)((_cx) + (_cw))) \ - _w = (_cx) + (_cw) - _x; \ - if ((int)_y < (int)(_cy)) \ - { \ - if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \ - else _h += ((int)_y - (int)(_cy)); \ - _y = (_cy); \ - } \ - if ((int)(_y + _h) > (int)((_cy) + (_ch))) \ - _h = (_cy) + (_ch) - _y; \ - } \ - else \ - { \ - _w = 0; _h = 0; \ - } \ -} - - -#define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \ - { \ - int _v, _vv; \ - \ - _v = (256 - (interp_x)) * (in1); \ - if ((interp_x) > 0) _v += (interp_x) * (in2); \ - _v *= (256 - (interp_y)); \ - if ((interp_y) > 0) \ - { \ - _vv = (256 - (interp_x)) * (in3); \ - if ((interp_x) > 0) _vv += (interp_x) * (in4); \ - _vv *= (interp_y); \ - (out) = ((_v + _vv) >> 16); \ - } \ - else (out) = (_v >> 16); \ - } - -#define INTERP_2(in1, in2, interp, interp_inv) \ - ((in1 * interp_inv) + (in2 * interp)) >> 8 - - -#define CONVERT_LOOP_START_ROT_0() \ - src_ptr = src; \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP_END_ROT_0() \ - dst_ptr++; \ - src_ptr++; \ - } \ - src_ptr += src_jump; \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP_START_ROT_180() \ - src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP_END_ROT_180() \ - dst_ptr++; \ - src_ptr--; \ - } \ - src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP_START_ROT_270() \ - src_ptr = src + ((w - 1) * (h + src_jump)); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP_END_ROT_270() \ - dst_ptr++; \ - src_ptr -= (h + src_jump); \ - } \ - src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP_START_ROT_90() \ - src_ptr = src + (h - 1); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP_END_ROT_90() \ - dst_ptr++; \ - src_ptr += (h + src_jump); \ - } \ - src_ptr = src + (h - 1) - y - 1; \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP2_START_ROT_0() \ - src_ptr = src; \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP2_INC_ROT_0() \ -src_ptr++; \ -x++; - -#define CONVERT_LOOP2_END_ROT_0() \ - dst_ptr+=2; \ - src_ptr++; \ - } \ - src_ptr += src_jump; \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP2_START_ROT_180() \ - src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP2_INC_ROT_180() \ -src_ptr--; \ -x++; - -#define CONVERT_LOOP2_END_ROT_180() \ - dst_ptr+=2; \ - src_ptr--; \ - } \ - src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP2_START_ROT_270() \ - src_ptr = src + ((w - 1) * (h + src_jump)); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP2_INC_ROT_270() \ -src_ptr -= (h + src_jump); \ -x++; - -#define CONVERT_LOOP2_END_ROT_270() \ - dst_ptr+=2; \ - src_ptr -= (h + src_jump); \ - } \ - src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ - dst_ptr += dst_jump; \ - } - -#define CONVERT_LOOP2_START_ROT_90() \ - src_ptr = src + (h - 1); \ - for (y = 0; y < h; y++) \ - { \ - for (x = 0; x < w; x++) \ - { - -#define CONVERT_LOOP2_INC_ROT_90() \ -src_ptr += (h + src_jump); \ -x++; - -#define CONVERT_LOOP2_END_ROT_90() \ - dst_ptr+=2; \ - src_ptr += (h + src_jump); \ - } \ - src_ptr = src + (h - 1) - y - 1; \ - dst_ptr += dst_jump; \ - } - -#endif diff --git a/libraries/evas/src/lib/include/evas_mmx.h b/libraries/evas/src/lib/include/evas_mmx.h deleted file mode 100644 index e1095e1..0000000 --- a/libraries/evas/src/lib/include/evas_mmx.h +++ /dev/null @@ -1,735 +0,0 @@ -/* mmx.h - - MultiMedia eXtensions GCC interface library for IA32. - - To use this library, simply include this header file - and compile with GCC. You MUST have inlining enabled - in order for mmx_ok() to work; this can be done by - simply using -O on the GCC command line. - - Compiling with -DMMX_TRACE will cause detailed trace - output to be sent to stderr for each mmx operation. - This adds lots of code, and obviously slows execution to - a crawl, but can be very useful for debugging. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT - LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR ANY PARTICULAR PURPOSE. - - 1997-98 by H. Dietz and R. Fisher - - History: - 97-98* R.Fisher Early versions - 980501 R.Fisher Original Release - 980611* H.Dietz Rewrite, correctly implementing inlines, and - R.Fisher including direct register accesses. - 980616 R.Fisher Release of 980611 as 980616. - 980714 R.Fisher Minor corrections to Makefile, etc. - 980715 R.Fisher mmx_ok() now prevents optimizer from using - clobbered values. - mmx_ok() now checks if cpuid instruction is - available before trying to use it. - 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix - Extended MMX, and standard MMX. It returns a - value which is positive if any of these are - supported, and can be masked with constants to - see which. mmx_ok() is now a call to this - 980726* R.Fisher Added i2r support for shift functions - 980919 R.Fisher Fixed AMD extended feature recognition bug. - 980921 R.Fisher Added definition/check for _MMX_H. - Added "float s[2]" to mmx_t for use with - 3DNow and EMMX. So same mmx_t can be used. - 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) - Fixed psllq_i2r error in mmxtest.c - - * Unreleased (internal or interim) versions - - Notes: - It appears that the latest gas has the pand problem fixed, therefore - I'll undefine BROKEN_PAND by default. - String compares may be quicker than the multiple test/jumps in vendor - test sequence in mmx_ok(), but I'm not concerned with that right now. - - Acknowledgments: - Jussi Laako for pointing out the errors ultimately found to be - connected to the failure to notify the optimizer of clobbered values. - Roger Hardiman for reminding us that CPUID isn't everywhere, and that - someone may actually try to use this on a machine without CPUID. - Also for suggesting code for checking this. - Robert Dale for pointing out the AMD recognition bug. - Jimmy Mayfield and Carl Witty for pointing out the Intel recognition - bug. - Carl Witty for pointing out the psllq_i2r test bug. -*/ - -#ifndef _MMX_H -#define _MMX_H - -/* Warning: at this writing, the version of GAS packaged - with most Linux distributions does not handle the - parallel AND operation mnemonic correctly. If the - symbol BROKEN_PAND is defined, a slower alternative - coding will be used. If execution of mmxtest results - in an illegal instruction fault, define this symbol. -*/ -#undef BROKEN_PAND - - -/* The type of an value that fits in an MMX register - (note that long long constant values MUST be suffixed - by LL and unsigned long long values by ULL, lest - they be truncated by the compiler) -*/ -typedef union { - long long q; /* Quadword (64-bit) value */ - unsigned long long uq; /* Unsigned Quadword */ - int d[2]; /* 2 Doubleword (32-bit) values */ - unsigned int ud[2]; /* 2 Unsigned Doubleword */ - short w[4]; /* 4 Word (16-bit) values */ - unsigned short uw[4]; /* 4 Unsigned Word */ - char b[8]; /* 8 Byte (8-bit) values */ - unsigned char ub[8]; /* 8 Unsigned Byte */ - float s[2]; /* Single-precision (32-bit) value */ -} __attribute__ ((aligned (8))) mmx_t; - -/* Helper functions for the instruction macros that follow... - (note that memory-to-register, m2r, instructions are nearly - as efficient as register-to-register, r2r, instructions; - however, memory-to-memory instructions are really simulated - as a convenience, and are only 1/3 as efficient) -*/ - -/* These macros are a lot simpler without the tracing... -*/ - -#define mmx_i2r(op, imm, reg) \ - __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ - : /* nothing */ \ - : /* nothing */); - -#define mmx_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "m" (mem)) - -#define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=m" (mem) \ - : /* nothing */ ) - -#define mmx_a2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "m" (mem)) - -#define mmx_r2a(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=m" (mem) \ - : /* nothing */ ) - -#define mmx_r2r(op, regs, regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) - -#define mmx_m2m(op, mems, memd) \ - __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ - #op " %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (memd) \ - : "X" (mems)) - -/* 1x64 MOVE Quadword - (this is both a load and a store... - in fact, it is the only way to store) -*/ -#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) -#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) -#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) -#define movq(vars, vard) \ - __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ - "movq %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) -#define movntq_r2m(reg, var) mmx_r2m(movntq, reg, var) - - -/* 1x32 MOVE Doubleword - (like movq, this is both load and store... - but is most useful for moving things between - mmx registers and ordinary registers) -*/ -#define movd_m2r(var, reg) mmx_a2r(movd, var, reg) -#define movd_r2m(reg, var) mmx_r2a(movd, reg, var) -#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) -#define movd(vars, vard) \ - __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ - "movd %%mm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) - - -/* 2x32, 4x16, and 8x8 Parallel ADDs -*/ -#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) -#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) -#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) - -#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) -#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) -#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) - -#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) -#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) -#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic -*/ -#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) -#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) -#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) - -#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) -#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) -#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) - - -/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic -*/ -#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) -#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) -#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) - -#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) -#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) -#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel SUBs -*/ -#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) -#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) -#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) - -#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) -#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) -#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) - -#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) -#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) -#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic -*/ -#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) -#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) -#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) - -#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) -#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) -#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) - - -/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic -*/ -#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) -#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) -#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) - -#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) -#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) -#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) - - -/* 4x16 Parallel MULs giving Low 4x16 portions of results -*/ -#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) -#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) -#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) - - -/* 4x16 Parallel MULs giving High 4x16 portions of results -*/ -#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) -#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) -#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) - - -/* 4x16->2x32 Parallel Mul-ADD - (muls like pmullw, then adds adjacent 16-bit fields - in the multiply result to make the final 2x32 result) -*/ -#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) -#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) -#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) - - -/* 1x64 bitwise AND -*/ -#ifdef BROKEN_PAND -#define pand_m2r(var, reg) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, reg); \ - mmx_m2r(pandn, var, reg); \ - } -#define pand_r2r(regs, regd) \ - { \ - mmx_m2r(pandn, (mmx_t) -1LL, regd); \ - mmx_r2r(pandn, regs, regd) \ - } -#define pand(vars, vard) \ - { \ - movq_m2r(vard, mm0); \ - mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ - mmx_m2r(pandn, vars, mm0); \ - movq_r2m(mm0, vard); \ - } -#else -#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) -#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) -#define pand(vars, vard) mmx_m2m(pand, vars, vard) -#endif - - -/* 1x64 bitwise AND with Not the destination -*/ -#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) -#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) -#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) - - -/* 1x64 bitwise OR -*/ -#define por_m2r(var, reg) mmx_m2r(por, var, reg) -#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) -#define por(vars, vard) mmx_m2m(por, vars, vard) - - -/* 1x64 bitwise eXclusive OR -*/ -#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) -#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) -#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality - (resulting fields are either 0 or -1) -*/ -#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) -#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) -#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) - -#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) -#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) -#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) - -#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) -#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) -#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) - - -/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than - (resulting fields are either 0 or -1) -*/ -#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) -#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) -#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) - -#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) -#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) -#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) - -#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) -#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) -#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical -*/ -#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) -#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) -#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) -#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) - -#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) -#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) -#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) -#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) - -#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) -#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) -#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) -#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) - - -/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical -*/ -#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) -#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) -#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) -#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) - -#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) -#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) -#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) -#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) - -#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) -#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) -#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) -#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) - - -/* 2x32 and 4x16 Parallel Shift Right Arithmetic -*/ -#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) -#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) -#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) -#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) - -#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) -#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) -#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) -#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) - - -/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate - (packs source and dest fields into dest in that order) -*/ -#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) -#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) -#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) - -#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) -#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) -#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) - - -/* 4x16->8x8 PACK and Unsigned Saturate - (packs source and dest fields into dest in that order) -*/ -#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) -#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) -#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low - (interleaves low half of dest with low half of source - as padding in each result field) -*/ -#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) -#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) -#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) - -#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) -#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) -#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) - -#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) -#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) -#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) - - -/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High - (interleaves high half of dest with high half of source - as padding in each result field) -*/ -#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) -#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) -#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) - -#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) -#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) -#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) - -#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) -#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) -#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) - -#define MOVE_8DWORDS_MMX(src,dst) \ - __asm__ ( \ - "movq (%1), %%mm0 \n" \ - "movq 0x8(%1), %%mm1 \n" \ - "movq 0x10(%1), %%mm2 \n" \ - "movq 0x18(%1), %%mm3 \n" \ - "movq %%mm0, (%0) \n" \ - "movq %%mm1, 0x8(%0) \n" \ - "movq %%mm2, 0x10(%0) \n" \ - "movq %%mm3, 0x18(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -#define MOVE_10DWORDS_MMX(src,dst) \ - __asm__ ( \ - "movq (%1), %%mm0 \n" \ - "movq 0x8(%1), %%mm1 \n" \ - "movq 0x10(%1), %%mm2 \n" \ - "movq 0x18(%1), %%mm3 \n" \ - "movq 0x20(%1), %%mm4 \n" \ - "movq %%mm0, (%0) \n" \ - "movq %%mm1, 0x8(%0) \n" \ - "movq %%mm2, 0x10(%0) \n" \ - "movq %%mm3, 0x18(%0) \n" \ - "movq %%mm4, 0x20(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -#define MOVE_16DWORDS_MMX(src,dst) \ - __asm__ ( \ - "movq (%1), %%mm0 \n" \ - "movq 0x8(%1), %%mm1 \n" \ - "movq 0x10(%1), %%mm2 \n" \ - "movq 0x18(%1), %%mm3 \n" \ - "movq 0x20(%1), %%mm4 \n" \ - "movq 0x28(%1), %%mm5 \n" \ - "movq 0x30(%1), %%mm6 \n" \ - "movq 0x38(%1), %%mm7 \n" \ - "movq %%mm0, (%0) \n" \ - "movq %%mm1, 0x8(%0) \n" \ - "movq %%mm2, 0x10(%0) \n" \ - "movq %%mm3, 0x18(%0) \n" \ - "movq %%mm4, 0x20(%0) \n" \ - "movq %%mm5, 0x28(%0) \n" \ - "movq %%mm6, 0x30(%0) \n" \ - "movq %%mm7, 0x38(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -#define MOVE_16DWORDS_MMX2(src,dst) \ - __asm__ ( \ - "movq (%1), %%mm0 \n" \ - "movq 0x8(%1), %%mm1 \n" \ - "movq 0x10(%1), %%mm2 \n" \ - "movq 0x18(%1), %%mm3 \n" \ - "movq 0x20(%1), %%mm4 \n" \ - "movq 0x28(%1), %%mm5 \n" \ - "movq 0x30(%1), %%mm6 \n" \ - "movq 0x38(%1), %%mm7 \n" \ - "movntq %%mm0, (%0) \n" \ - "movntq %%mm1, 0x8(%0) \n" \ - "movntq %%mm2, 0x10(%0) \n" \ - "movntq %%mm3, 0x18(%0) \n" \ - "movntq %%mm4, 0x20(%0) \n" \ - "movntq %%mm5, 0x28(%0) \n" \ - "movntq %%mm6, 0x30(%0) \n" \ - "movntq %%mm7, 0x38(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -#define MOVE_32DWORDS_SSE2(src,dst) \ - __asm__ ( \ - "movdqu (%1), %%xmm0 \n" \ - "movdqu 0x10(%1), %%xmm1 \n" \ - "movdqu 0x20(%1), %%xmm2 \n" \ - "movdqu 0x30(%1), %%xmm3 \n" \ - "movdqu 0x40(%1), %%xmm4 \n" \ - "movdqu 0x50(%1), %%xmm5 \n" \ - "movdqu 0x60(%1), %%xmm6 \n" \ - "movdqu 0x70(%1), %%xmm7 \n" \ - "movntdq %%xmm0, (%0) \n" \ - "movntdq %%xmm1, 0x10(%0) \n" \ - "movntdq %%xmm2, 0x20(%0) \n" \ - "movntdq %%xmm3, 0x30(%0) \n" \ - "movntdq %%xmm4, 0x40(%0) \n" \ - "movntdq %%xmm5, 0x50(%0) \n" \ - "movntdq %%xmm6, 0x60(%0) \n" \ - "movntdq %%xmm7, 0x70(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -#define MOVE_32DWORDS_ALIGNED_SSE2(src,dst) \ - __asm__ ( \ - "movdqa (%1), %%xmm0 \n" \ - "movdqa 0x10(%1), %%xmm1 \n" \ - "movdqa 0x20(%1), %%xmm2 \n" \ - "movdqa 0x30(%1), %%xmm3 \n" \ - "movdqa 0x40(%1), %%xmm4 \n" \ - "movdqa 0x50(%1), %%xmm5 \n" \ - "movdqa 0x60(%1), %%xmm6 \n" \ - "movdqa 0x70(%1), %%xmm7 \n" \ - "movntdq %%xmm0, (%0) \n" \ - "movntdq %%xmm1, 0x10(%0) \n" \ - "movntdq %%xmm2, 0x20(%0) \n" \ - "movntdq %%xmm3, 0x30(%0) \n" \ - "movntdq %%xmm4, 0x40(%0) \n" \ - "movntdq %%xmm5, 0x50(%0) \n" \ - "movntdq %%xmm6, 0x60(%0) \n" \ - "movntdq %%xmm7, 0x70(%0) \n" \ - : \ - : "q" (dst), "r" (src) \ - : "memory", "st"); - -/* Empty MMx State - (used to clean-up when going from mmx to float use - of the registers that are shared by both; note that - there is no float-to-mmx operation needed, because - only the float tag word info is corruptible) -*/ - -#define emms() __asm__ __volatile__ ("emms":::"memory") -#define sfence() __asm__ __volatile__ ("sfence":::"memory") - -/* additions to detect mmx - */ -/* Raster */ - -#define CPUID_MMX (1 << 23) /* flags: mmx */ -#define CPUID_SSE (1 << 25) /* flags: xmm */ -#define CPUID_SSE2 (1 << 26) /* flags: ? */ - -/* -#ifdef __amd64 -#define have_cpuid(cpuid_ret) \ - __asm__ __volatile__ ( \ - ".align 32 \n" \ - " pushq %%rbx \n" \ - " pushfq \n" \ - " popq %%rax \n" \ - " movq %%rax, %%rbx \n" \ - " xorq $0x200000, %%rax \n" \ - " pushq %%rax \n" \ - " popfq \n" \ - " pushfq \n" \ - " popq %%rax \n" \ - " cmpq %%rax, %%rbx \n" \ - " je 1f \n" \ - " movl $1, %0 \n" \ - " jmp 2f \n" \ - "1: \n" \ - " movl $0, %0 \n" \ - "2: \n" \ - " popq %%rbx \n" \ - : "=m" (cpuid_ret) \ - ); - -#define get_cpuid(cpuid_ret) \ - __asm__ __volatile__ ( \ - ".align 32 \n" \ - " pushq %%rax \n" \ - " movl $1, %%eax \n" \ - " cpuid \n" \ - " test $0x00800000, %%edx\n" \ - "1: \n" \ - " movl %%edx, %0 \n" \ - " jmp 2f \n" \ - "2: \n" \ - " movl $0, %0 \n" \ - " popq %%rax \n" \ - : "=m" (cpuid_ret) \ - ); -#else -#define have_cpuid(cpuid_ret) \ - __asm__ __volatile__ ( \ - ".align 32 \n" \ - " pushl %%ebx \n" \ - " pushfl \n" \ - " popl %%eax \n" \ - " movl %%eax, %%ebx \n" \ - " xorl $0x200000, %%eax \n" \ - " pushl %%eax \n" \ - " popfl \n" \ - " pushfl \n" \ - " popl %%eax \n" \ - " cmpl %%eax, %%ebx \n" \ - " je 1f \n" \ - " movl $1, %0 \n" \ - " jmp 2f \n" \ - "1: \n" \ - " movl $0, %0 \n" \ - "2: \n" \ - " popl %%ebx \n" \ - : "=m" (cpuid_ret) \ - ); - -#define get_cpuid(cpuid_ret) \ - __asm__ __volatile__ ( \ - ".align 32 \n" \ - " pushl %%eax \n" \ - " movl $1, %%eax \n" \ - " cpuid \n" \ - " test $0x00800000, %%edx\n" \ - "1: \n" \ - " movl %%edx, %0 \n" \ - " jmp 2f \n" \ - "2: \n" \ - " movl $0, %0 \n" \ - " popl %%eax \n" \ - : "=m" (cpuid_ret) \ - ); -#endif - */ - -#define prefetch(var) \ - __asm__ __volatile__ ( \ - "prefetchnta (%0) \n" \ - : \ - : "r" (var) \ - ); -#define prefetch0(var) \ - __asm__ __volatile__ ( \ - "prefetcht0 (%0) \n" \ - : \ - : "r" (var) \ - ); -#define prefetch1(var) \ - __asm__ __volatile__ ( \ - "prefetcht1 (%0) \n" \ - : \ - : "r" (var) \ - ); -#define prefetch2(var) \ - __asm__ __volatile__ ( \ - "prefetcht2 (%0) \n" \ - : \ - : "r" (var) \ - ); -#define pshufw(r1, r2, imm) \ - __asm__ __volatile__ ( \ - "pshufw $" #imm ", %" #r1 ", %" #r2 " \n" \ - ); - -#define pshufhw(r1, r2, imm) \ - __asm__ __volatile__ ( \ - "pshufhw $" #imm ", %" #r1 ", %" #r2 " \n" \ - ); - -#define pshuflw(r1, r2, imm) \ - __asm__ __volatile__ ( \ - "pshuflw $" #imm ", %" #r1 ", %" #r2 " \n" \ - ); -#define pshufd(r1, r2, imm) \ - __asm__ __volatile__ ( \ - "pshufd $" #imm ", %" #r1 ", %" #r2 " \n" \ - ); - -/* 1x238 MOVE Doouble Quadword - (this is both a load and a store... - in fact, it is the only way to store) -*/ -#define movdqu_m2r(var, reg) mmx_m2r(movdqu, var, reg) -#define movdqu_r2m(reg, var) mmx_r2m(movdqu, reg, var) -#define movdqu_r2r(regs, regd) mmx_r2r(movdqu, regs, regd) -#define movdqu(vars, vard) \ - __asm__ __volatile__ ("movdqu %1, %%xmm0\n\t" \ - "movdqu %%xmm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) -#define movdqa_m2r(var, reg) mmx_m2r(movdqa, var, reg) -#define movdqa_r2m(reg, var) mmx_r2m(movdqa, reg, var) -#define movdqa_r2r(regs, regd) mmx_r2r(movdqa, regs, regd) -#define movdqa(vars, vard) \ - __asm__ __volatile__ ("movdqa %1, %%xmm0\n\t" \ - "movdqa %%xmm0, %0" \ - : "=X" (vard) \ - : "X" (vars)) -#define movntdq_r2m(reg, var) mmx_r2m(movntdq, reg, var) - - -/* end additions */ - -#endif diff --git a/libraries/evas/src/lib/include/evas_options.h b/libraries/evas/src/lib/include/evas_options.h deleted file mode 100644 index f6739c0..0000000 --- a/libraries/evas/src/lib/include/evas_options.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef EVAS_OPTIONS_H -#define EVAS_OPTIONS_H 1 - -/* these may vary per OS */ - -/* what to build *//* small dither table is MUCH faster on ipaq */ -/*#define BUILD_SMALL_DITHER_MASK*/ - -/*#define HARD_CODED_P3*/ -/*#define HARD_CODED_P2*/ - -/*#define BUILD_CONVERT_1_GRY_1*/ -/*#define BUILD_CONVERT_4_GRY_1*/ -/*#define BUILD_CONVERT_4_GRY_4*/ -/*#define BUILD_CONVERT_8_GRY_1*/ -/*#define BUILD_CONVERT_8_GRY_4*/ -/*#define BUILD_CONVERT_8_GRY_16*/ -/*#define BUILD_CONVERT_8_GRY_64*/ -/*#define BUILD_CONVERT_8_GRY_256*/ -/*#define BUILD_CONVERT_8_RGB_332*/ -/*#define BUILD_CONVERT_8_RGB_666*/ -/*#define BUILD_CONVERT_8_RGB_232*/ -/*#define BUILD_CONVERT_8_RGB_222*/ -/*#define BUILD_CONVERT_8_RGB_221*/ -/*#define BUILD_CONVERT_8_RGB_121*/ -/*#define BUILD_CONVERT_8_RGB_111*/ -/*#define BUILD_CONVERT_16_RGB_565*/ -/*#define BUILD_CONVERT_16_RGB_555*/ -/*#define BUILD_CONVERT_16_RGB_444*/ -/*#define BUILD_CONVERT_16_RGB_454645*/ -/*#define BUILD_CONVERT_16_RGB_ROT0*/ -/*#define BUILD_CONVERT_16_RGB_ROT270*/ -/*#define BUILD_CONVERT_24_RGB_888*/ -/*#define BUILD_CONVERT_24_BGR_888*/ -/*#define BUILD_CONVERT_32_RGB_8888*/ -/*#define BUILD_CONVERT_32_BGR_8888*/ -/*#define BUILD_CONVERT_32_RGB_ROT0*/ -/*#define BUILD_CONVERT_32_RGB_ROT270*/ - -/*#define BUILD_SCALE_SAMPLE*/ -/*#define BUILD_SCALE_SMOOTH*/ -/*#define BUILD_SCALE_TRILINEAR*/ - -/*#define BUILD_MMX*/ -/*#define BUILD_SSE*/ -/*#define BUILD_SSE3*/ -/*#define BUILD_C*/ - -/*#define BUILD_LOADER_PNG*/ -/*#define BUILD_LOADER_JPEG*/ -/*#define BUILD_LOADER_EET*/ -/*#define BUILD_LOADER_EDB*/ - -/*#define BUILD_FMEMOPEN*/ - -/* check in that the user configured it right */ -#ifndef BUILD_MMX -# ifndef BUILD_SSE3 -# ifndef BUILD_SSE -# ifndef BUILD_C -# error "Please Read the README" - #endif -# endif -# endif -#endif - -#define DIRECT_SCALE - -#endif diff --git a/libraries/evas/src/lib/include/evas_private.h b/libraries/evas/src/lib/include/evas_private.h deleted file mode 100644 index bf0cfc5..0000000 --- a/libraries/evas/src/lib/include/evas_private.h +++ /dev/null @@ -1,1122 +0,0 @@ -#ifndef EVAS_PRIVATE_H -#define EVAS_PRIVATE_H - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "Evas.h" - -#include "../file/evas_module.h" -#include "../file/evas_path.h" -#include "../engines/common/evas_text_utils.h" -#include "../engines/common/language/evas_bidi_utils.h" -#include "../engines/common/language/evas_language_utils.h" - -#ifdef EVAS_MAGIC_DEBUG -/* complain when peole pass in wrong object types etc. */ -# define MAGIC_DEBUG -#endif - -#define RENDER_METHOD_INVALID 0x00000000 - -typedef struct _Evas_Layer Evas_Layer; -typedef struct _Evas_Size Evas_Size; -typedef struct _Evas_Aspect Evas_Aspect; -typedef struct _Evas_Border Evas_Border; -typedef struct _Evas_Double_Pair Evas_Double_Pair; -typedef struct _Evas_Size_Hints Evas_Size_Hints; -typedef struct _Evas_Font_Dir Evas_Font_Dir; -typedef struct _Evas_Font Evas_Font; -typedef struct _Evas_Font_Alias Evas_Font_Alias; -typedef struct _Evas_Font_Description Evas_Font_Description; -typedef struct _Evas_Data_Node Evas_Data_Node; -typedef struct _Evas_Func_Node Evas_Func_Node; -typedef RGBA_Image_Loadopts Evas_Image_Load_Opts; -typedef struct _Evas_Func Evas_Func; -typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func; -typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; -typedef struct _Evas_Object_Func Evas_Object_Func; -typedef struct _Evas_Intercept_Func Evas_Intercept_Func; -typedef struct _Evas_Key_Grab Evas_Key_Grab; -typedef struct _Evas_Callbacks Evas_Callbacks; -typedef struct _Evas_Format Evas_Format; -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; -typedef struct _Evas_Coord_Touch_Point Evas_Coord_Touch_Point; - -enum _Evas_Font_Style -{ - EVAS_FONT_STYLE_SLANT, - EVAS_FONT_STYLE_WEIGHT, - EVAS_FONT_STYLE_WIDTH -}; - -enum _Evas_Font_Slant -{ - EVAS_FONT_SLANT_NORMAL, - EVAS_FONT_SLANT_OBLIQUE, - EVAS_FONT_SLANT_ITALIC -}; - -enum _Evas_Font_Weight -{ - EVAS_FONT_WEIGHT_NORMAL, - EVAS_FONT_WEIGHT_THIN, - EVAS_FONT_WEIGHT_ULTRALIGHT, - EVAS_FONT_WEIGHT_LIGHT, - EVAS_FONT_WEIGHT_BOOK, - EVAS_FONT_WEIGHT_MEDIUM, - EVAS_FONT_WEIGHT_SEMIBOLD, - EVAS_FONT_WEIGHT_BOLD, - EVAS_FONT_WEIGHT_ULTRABOLD, - EVAS_FONT_WEIGHT_BLACK, - EVAS_FONT_WEIGHT_EXTRABLACK -}; - -enum _Evas_Font_Width -{ - EVAS_FONT_WIDTH_NORMAL, - EVAS_FONT_WIDTH_ULTRACONDENSED, - EVAS_FONT_WIDTH_EXTRACONDENSED, - EVAS_FONT_WIDTH_CONDENSED, - EVAS_FONT_WIDTH_SEMICONDENSED, - EVAS_FONT_WIDTH_SEMIEXPANDED, - EVAS_FONT_WIDTH_EXPANDED, - EVAS_FONT_WIDTH_EXTRAEXPANDED, - EVAS_FONT_WIDTH_ULTRAEXPANDED -}; - -typedef enum _Evas_Font_Style Evas_Font_Style; -typedef enum _Evas_Font_Slant Evas_Font_Slant; -typedef enum _Evas_Font_Weight Evas_Font_Weight; -typedef enum _Evas_Font_Width Evas_Font_Width; - -/* 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 -#define MAGIC_OBJ_LINE 0x71777772 -#define MAGIC_OBJ_POLYGON 0x71777774 -#define MAGIC_OBJ_IMAGE 0x71777775 -#define MAGIC_OBJ_TEXT 0x71777776 -#define MAGIC_OBJ_SMART 0x71777777 -#define MAGIC_OBJ_TEXTBLOCK 0x71777778 -#define MAGIC_SMART 0x72777770 -#define MAGIC_OBJ_SHAPE 0x72777773 -#define MAGIC_OBJ_CONTAINER 0x72777774 -#define MAGIC_OBJ_CUSTOM 0x72777775 -#define MAGIC_EVAS_GL 0x72777776 -#define MAGIC_MAP 0x72777777 - -#ifdef MAGIC_DEBUG -# define MAGIC_CHECK_FAILED(o, t, m) \ -{evas_debug_error(); \ - if (!o) evas_debug_input_null(); \ - else if (((t *)o)->magic == 0) evas_debug_magic_null(); \ - else evas_debug_magic_wrong((m), ((t *)o)->magic); \ -} -# define MAGIC_CHECK(o, t, m) \ -{if ((!o) || (!(((t *)o)->magic == (m)))) { \ -MAGIC_CHECK_FAILED(o, t, m) -# define MAGIC_CHECK_END() }} -#else -# define MAGIC_CHECK_FAILED(o, t, m) -# define MAGIC_CHECK(o, t, m) { if (!o) { -# define MAGIC_CHECK_END() }} -#endif - -#define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h); - -#define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE -#define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL -#define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED - -#define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o) \ - if ((o)->cur.file) \ - { \ - eina_stringshare_del((o)->cur.file); \ - if ((o)->prev.file == (o)->cur.file) \ - (o)->prev.file = NULL; \ - (o)->cur.file = NULL; \ - } \ - if ((o)->cur.key) \ - { \ - eina_stringshare_del((o)->cur.key); \ - if ((o)->prev.key == (o)->cur.key) \ - (o)->prev.key = NULL; \ - (o)->cur.key = NULL; \ - } \ - if ((o)->prev.file) \ - { \ - eina_stringshare_del((o)->prev.file); \ - (o)->prev.file = NULL; \ - } \ - if ((o)->prev.key) \ - { \ - eina_stringshare_del((o)->prev.key); \ - (o)->prev.key = NULL; \ - } - -struct _Evas_Coord_Touch_Point -{ - Evas_Coord x, y; // point's x, y position - int id; // id in order to distinguish each point - Evas_Touch_Point_State state; -}; - -struct _Evas_Key_Grab -{ - char *keyname; - Evas_Modifier_Mask modifiers; - Evas_Modifier_Mask not_modifiers; - Evas_Object *object; - Eina_Bool exclusive : 1; - Eina_Bool just_added : 1; - Eina_Bool delete_me : 1; -}; - -struct _Evas_Intercept_Func -{ - struct { - Evas_Object_Intercept_Show_Cb func; - void *data; - } show; - struct { - Evas_Object_Intercept_Hide_Cb func; - void *data; - } hide; - struct { - Evas_Object_Intercept_Move_Cb func; - void *data; - } move; - struct { - Evas_Object_Intercept_Resize_Cb func; - void *data; - } resize; - struct { - Evas_Object_Intercept_Raise_Cb func; - void *data; - } raise; - struct { - Evas_Object_Intercept_Lower_Cb func; - void *data; - } lower; - struct { - Evas_Object_Intercept_Stack_Above_Cb func; - void *data; - } stack_above; - struct { - Evas_Object_Intercept_Stack_Below_Cb func; - void *data; - } stack_below; - struct { - Evas_Object_Intercept_Layer_Set_Cb func; - void *data; - } layer_set; - struct { - Evas_Object_Intercept_Color_Set_Cb func; - void *data; - } color_set; - struct { - Evas_Object_Intercept_Clip_Set_Cb func; - void *data; - } clip_set; - struct { - Evas_Object_Intercept_Clip_Unset_Cb func; - void *data; - } clip_unset; -}; - -struct _Evas_Smart_Cb_Description_Array -{ - unsigned int size; - const Evas_Smart_Cb_Description **array; -}; - -struct _Evas_Smart -{ - DATA32 magic; - - int usage; - - const Evas_Smart_Class *smart_class; - - Evas_Smart_Cb_Description_Array callbacks; - - unsigned char delete_me : 1; - unsigned char class_allocated : 1; - -}; - -struct _Evas_Modifier -{ - struct { - int count; - char **list; - } mod; - Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */ -}; - -struct _Evas_Lock -{ - struct { - int count; - char **list; - } lock; - Evas_Modifier_Mask mask; /* we have a max of 64 locks */ -}; - -struct _Evas_Post_Callback -{ - Evas_Object *obj; - Evas_Object_Event_Post_Cb func; - const void *data; - unsigned char delete_me : 1; -}; - -struct _Evas_Callbacks -{ - Eina_Inlist *callbacks; - int walking_list; - unsigned char deletions_waiting : 1; -}; - -struct _Evas -{ - EINA_INLIST; - - DATA32 magic; - - struct { - unsigned char inside : 1; - int mouse_grabbed; - int downs; - DATA32 button; - Evas_Coord x, y; - int nogrep; - struct { - Eina_List *in; - } object; - } pointer; - - struct { - Evas_Coord x, y, w, h; - unsigned char changed : 1; - } viewport; - - struct { - int w, h; - DATA32 render_method; - unsigned char changed : 1; - } output; - - struct - { - Evas_Coord x, y, w, h; - Eina_Bool changed : 1; - } framespace; - - Eina_List *damages; - Eina_List *obscures; - - Evas_Layer *layers; - - Eina_Hash *name_hash; - - int output_validity; - - int walking_list; - int events_frozen; - Evas_Event_Flags default_event_flags; - - struct { - Evas_Module *module; - Evas_Func *func; - struct { - void *output; - - void *context; - } data; - - void *info; - int info_magic; - } engine; - - Eina_Array delete_objects; - Eina_Array active_objects; - Eina_Array restack_objects; - Eina_Array render_objects; - Eina_Array pending_objects; - Eina_Array obscuring_objects; - Eina_Array temporary_objects; - Eina_Array calculate_objects; - Eina_Array clip_changes; - - Eina_Clist calc_list; - Eina_Clist calc_done; - Eina_List *video_objects; - - Eina_List *post_events; // free me on evas_free - - Evas_Callbacks *callbacks; - - int delete_grabs; - int walking_grabs; - Eina_List *grabs; - - Eina_List *font_path; - - int in_smart_calc; - int smart_calc_count; - - Evas_Object *focused; - void *attach_data; - Evas_Modifier modifiers; - Evas_Lock locks; - unsigned int last_timestamp; - int last_mouse_down_counter; - int last_mouse_up_counter; - int nochange; - Evas_Font_Hinting_Flags hinting; - unsigned char changed : 1; - unsigned char delete_me : 1; - unsigned char invalidate : 1; - unsigned char cleanup : 1; - unsigned char focus : 1; - - Eina_List *touch_points; -}; - -struct _Evas_Layer -{ - EINA_INLIST; - - short layer; - Evas_Object *objects; - - Evas *evas; - - void *engine_data; - int usage; - unsigned char delete_me : 1; -}; - -struct _Evas_Size -{ - Evas_Coord w, h; -}; - -struct _Evas_Aspect -{ - Evas_Aspect_Control mode; - Evas_Size size; -}; - -struct _Evas_Border -{ - Evas_Coord l, r, t, b; -}; - -struct _Evas_Double_Pair -{ - double x, y; -}; - -struct _Evas_Size_Hints -{ - Evas_Size min, max, request; - Evas_Aspect aspect; - Evas_Double_Pair align, weight; - Evas_Border padding; -}; - -struct _Evas_Map_Point -{ - double x, y, z, px, py; - double u, v; - unsigned char r, g, b, a; -}; - -struct _Evas_Map -{ - DATA32 magic; - int count; // num of points - Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually - void *surface; // surface holding map if needed - int surface_w, surface_h; // current surface w & h alloc - Evas_Coord mx, my; // mouse x, y after conversion to map space - struct { - Evas_Coord px, py, z0, foc; - } persp; - Eina_Bool alpha : 1; - Eina_Bool smooth : 1; - 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; - - DATA32 magic; - - const char *type; - Evas_Layer *layer; - - struct { - Evas_Map *map; - Evas_Object *clipper; - Evas_Object *mask; - Evas_Object *map_parent; - double scale; - Evas_Coord_Rectangle geometry; - struct { - struct { - Evas_Coord x, y, w, h; - unsigned char r, g, b, a; - Eina_Bool visible : 1; - Eina_Bool dirty : 1; - } clip; - } cache; - short layer; - struct { - unsigned char r, g, b, a; - } color; - Eina_Bool usemap : 1; - Eina_Bool visible : 1; - Eina_Bool have_clipees : 1; - Eina_Bool anti_alias : 1; - Evas_Render_Op render_op : 4; - } cur, prev; - - char *name; - - Evas_Intercept_Func *interceptors; - - struct { - Eina_List *elements; - } data; - - Eina_List *grabs; - - Evas_Callbacks *callbacks; - - struct { - Eina_List *clipees; - Eina_List *changes; - } clip; - - const Evas_Object_Func *func; - - void *object_data; - - struct { - Evas_Smart *smart; - Evas_Object *parent; - } smart; - - struct { - Eina_List *proxies; - void *surface; - int w,h; - Eina_Bool redraw; - } proxy; - -#if 0 // filtering disabled - Evas_Filter_Info *filter; -#endif - - Evas_Size_Hints *size_hints; - - int last_mouse_down_counter; - int last_mouse_up_counter; - int mouse_grabbed; - - int last_event; - Evas_Callback_Type last_event_type; - - struct { - int in_move, in_resize; - } doing; - - unsigned int ref; - - unsigned char delete_me; - - unsigned char recalculate_cycle; - Eina_Clist calc_entry; - - Evas_Object_Pointer_Mode pointer_mode : 2; - - Eina_Bool store : 1; - Eina_Bool pass_events : 1; - Eina_Bool freeze_events : 1; - Eina_Bool repeat_events : 1; - struct { - Eina_Bool pass_events : 1; - Eina_Bool pass_events_valid : 1; - Eina_Bool freeze_events : 1; - Eina_Bool freeze_events_valid : 1; - } parent_cache; - Eina_Bool restack : 1; - Eina_Bool is_active : 1; - Eina_Bool precise_is_inside : 1; - Eina_Bool is_static_clip : 1; - - Eina_Bool render_pre : 1; - Eina_Bool rect_del : 1; - Eina_Bool mouse_in : 1; - Eina_Bool pre_render_done : 1; - Eina_Bool intercepted : 1; - Eina_Bool focused : 1; - Eina_Bool in_layer : 1; - Eina_Bool no_propagate : 1; - - Eina_Bool changed : 1; - Eina_Bool changed_move : 1; - Eina_Bool changed_move_only : 1; - Eina_Bool changed_nomove : 1; - Eina_Bool changed_map : 1; - Eina_Bool changed_pchange : 1; - Eina_Bool del_ref : 1; - - Eina_Bool is_frame : 1; -}; - -struct _Evas_Func_Node -{ - EINA_INLIST; - void (*func) (); - void *data; - Evas_Callback_Type type; - Evas_Callback_Priority priority; - unsigned char delete_me : 1; -}; - -struct _Evas_Data_Node -{ - char *key; - void *data; -}; - -struct _Evas_Font_Dir -{ - Eina_Hash *lookup; - Eina_List *fonts; - Eina_List *aliases; - DATA64 dir_mod_time; - DATA64 fonts_dir_mod_time; - DATA64 fonts_alias_mod_time; -}; - -struct _Evas_Font -{ - struct { - const char *prop[14]; - } x; - struct { - const char *name; - } simple; - const char *path; - char type; -}; - -struct _Evas_Font_Alias -{ - const char *alias; - Evas_Font *fn; -}; - -struct _Evas_Font_Description -{ - int ref; - /* We assume everywhere this is stringshared */ - const char *name; - const char *fallbacks; - const char *lang; - - Evas_Font_Slant slant; - Evas_Font_Weight weight; - Evas_Font_Width width; - - Eina_Bool is_new : 1; -}; - -struct _Evas_Object_Func -{ - void (*free) (Evas_Object *obj); - void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y); - void (*render_pre) (Evas_Object *obj); - void (*render_post) (Evas_Object *obj); - - unsigned int (*type_id_get) (Evas_Object *obj); - unsigned int (*visual_id_get) (Evas_Object *obj); - void *(*engine_data_get) (Evas_Object *obj); - - void (*store) (Evas_Object *obj); - void (*unstore) (Evas_Object *obj); - - int (*is_visible) (Evas_Object *obj); - int (*was_visible) (Evas_Object *obj); - - int (*is_opaque) (Evas_Object *obj); - int (*was_opaque) (Evas_Object *obj); - - int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); - int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); - - void (*coords_recalc) (Evas_Object *obj); - - void (*scale_update) (Evas_Object *obj); - - int (*has_opaque_rect) (Evas_Object *obj); - int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); - - int (*can_map) (Evas_Object *obj); -}; - -struct _Evas_Func -{ - void *(*info) (Evas *e); - void (*info_free) (Evas *e, void *info); - int (*setup) (Evas *e, void *info); - - void (*output_free) (void *data); - void (*output_resize) (void *data, int w, int h); - void (*output_tile_size_set) (void *data, int w, int h); - void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h); - void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h); - void (*output_redraws_clear) (void *data); - void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); - void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); - void (*output_flush) (void *data); - void (*output_idle_flush) (void *data); - void (*output_dump) (void *data); - - void *(*context_new) (void *data); - Eina_Bool (*canvas_alpha_get) (void *data, void *context); - void (*context_free) (void *data, void *context); - void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h); - void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h); - void (*context_clip_unset) (void *data, void *context); - int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h); - void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h); - void (*context_mask_unset) (void *data, void *context); - void (*context_color_set) (void *data, void *context, int r, int g, int b, int a); - int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a); - void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a); - void (*context_multiplier_unset) (void *data, void *context); - int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a); - void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h); - void (*context_cutout_clear) (void *data, void *context); - void (*context_anti_alias_set) (void *data, void *context, unsigned char aa); - unsigned char (*context_anti_alias_get) (void *data, void *context); - void (*context_color_interpolation_set) (void *data, void *context, int color_space); - int (*context_color_interpolation_get) (void *data, void *context); - void (*context_render_op_set) (void *data, void *context, int render_op); - int (*context_render_op_get) (void *data, void *context); - - void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h); - - void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2); - - void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y); - void *(*polygon_points_clear) (void *data, void *context, void *polygon); - void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y); - - void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); - void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); - void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); - void (*image_free) (void *data, void *image); - void (*image_size_get) (void *data, void *image, int *w, int *h); - 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, 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); - void *(*image_alpha_set) (void *data, void *image, int has_alpha); - int (*image_alpha_get) (void *data, void *image); - void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b); - void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b); - void (*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); - char *(*image_comment_get) (void *data, void *image, char *key); - char *(*image_format_get) (void *data, void *image); - void (*image_colorspace_set) (void *data, void *image, int cspace); - int (*image_colorspace_get) (void *data, void *image); - Eina_Bool (*image_can_region_get) (void *data, void *image); - void (*image_mask_create) (void *data, void *image); - void *(*image_native_set) (void *data, void *image, void *native); - void *(*image_native_get) (void *data, void *image); - - void (*image_cache_flush) (void *data); - void (*image_cache_set) (void *data, int bytes); - int (*image_cache_get) (void *data); - - 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); - int (*font_cache_get) (void *data); - - /* Engine functions will over time expand from here */ - - 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, 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); - void (*image_map_surface_free) (void *data, void *surface); - - 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, 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_string_query) (void *data, int name); - 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); - void (*gl_img_obj_set) (void *data, void *image, int has_alpha); - - 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); - - /* animated feature */ - Eina_Bool (*image_animated_get) (void *data, void *image); - int (*image_animated_frame_count_get) (void *data, void *image); - Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image); - int (*image_animated_loop_count_get) (void *data, void *image); - double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num); - Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index); - - /* max size query */ - void (*image_max_size_get) (void *data, int *maxw, int *maxh); -}; - -struct _Evas_Image_Load_Func -{ - Eina_Bool threadable; - Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error); - Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error); - double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num); - Eina_Bool do_region; -}; - -struct _Evas_Image_Save_Func -{ - int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); -}; - -#ifdef __cplusplus -extern "C" { -#endif - -Evas_Object *evas_object_new(Evas *e); -void evas_object_free(Evas_Object *obj, int clean_layer); -void evas_object_inject(Evas_Object *obj, Evas *e); -void evas_object_release(Evas_Object *obj, int clean_layer); -void evas_object_change(Evas_Object *obj); -void evas_object_clip_changes_clean(Evas_Object *obj); -void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); -void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj); -void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj); -void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); -void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); - -void evas_object_clip_dirty(Evas_Object *obj); -void evas_object_recalc_clippees(Evas_Object *obj); -Evas_Layer *evas_layer_new(Evas *e); -void evas_layer_pre_free(Evas_Layer *lay); -void evas_layer_free_objects(Evas_Layer *lay); -void evas_layer_clean(Evas *e); -Evas_Layer *evas_layer_find(Evas *e, short layer_num); -void evas_layer_add(Evas_Layer *lay); -void evas_layer_del(Evas_Layer *lay); - -int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h); - -int evas_object_was_opaque(Evas_Object *obj); -int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -int evas_object_clippers_was_visible(Evas_Object *obj); -void evas_object_clip_across_check(Evas_Object *obj); -void evas_object_clip_across_clippees_check(Evas_Object *obj); -void evas_object_mapped_clip_across_mark(Evas_Object *obj); -void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); -void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id); -Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); -int evas_mem_free(int mem_required); -int evas_mem_degrade(int mem_required); -void evas_debug_error(void); -void evas_debug_input_null(void); -void evas_debug_magic_null(void); -void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied); -void evas_debug_generic(const char *str); -const char *evas_debug_magic_string_get(DATA32 magic); -void evas_object_smart_use(Evas_Smart *s); -void evas_object_smart_unuse(Evas_Smart *s); -void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1); -Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1); -const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; - -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); -Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj); -void _evas_object_image_video_overlay_show(Evas_Object *obj); -void _evas_object_image_video_overlay_hide(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); -void evas_object_smart_member_lower(Evas_Object *member); -void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other); -void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other); -const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj); -void _evas_object_smart_members_all_del(Evas_Object *obj); -void evas_call_smarts_calculate(Evas *e); -void *evas_mem_calloc(int size); -void _evas_post_event_callback_call(Evas *e); -void _evas_post_event_callback_free(Evas *e); -void evas_event_callback_list_post_free(Eina_Inlist **list); -void evas_object_event_callback_all_del(Evas_Object *obj); -void evas_object_event_callback_cleanup(Evas_Object *obj); -void evas_event_callback_all_del(Evas *e); -void evas_event_callback_cleanup(Evas *e); -void evas_object_inform_call_show(Evas_Object *obj); -void evas_object_inform_call_hide(Evas_Object *obj); -void evas_object_inform_call_move(Evas_Object *obj); -void evas_object_inform_call_resize(Evas_Object *obj); -void evas_object_inform_call_restack(Evas_Object *obj); -void evas_object_inform_call_changed_size_hints(Evas_Object *obj); -void evas_object_inform_call_image_preloaded(Evas_Object *obj); -void evas_object_inform_call_image_unloaded(Evas_Object *obj); -void evas_object_intercept_cleanup(Evas_Object *obj); -int evas_object_intercept_call_show(Evas_Object *obj); -int evas_object_intercept_call_hide(Evas_Object *obj); -int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); -int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); -int evas_object_intercept_call_raise(Evas_Object *obj); -int evas_object_intercept_call_lower(Evas_Object *obj); -int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above); -int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below); -int evas_object_intercept_call_layer_set(Evas_Object *obj, int l); -int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a); -int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip); -int evas_object_intercept_call_clip_unset(Evas_Object *obj); -void evas_object_grabs_cleanup(Evas_Object *obj); -void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers); -void evas_font_dir_cache_free(void); -const char *evas_font_dir_cache_find(char *dir, char *font); -Eina_List *evas_font_dir_available_list(const Evas* evas); -void evas_font_dir_available_list_free(Eina_List *available); -void evas_font_free(Evas *evas, void *font); -void evas_fonts_zero_free(Evas *evas); -void evas_fonts_zero_presure(Evas *evas); -void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name); -int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style); -Evas_Font_Description *evas_font_desc_new(void); -Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc); -void evas_font_desc_unref(Evas_Font_Description *fdesc); -int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b); -Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc); -void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size); -void evas_font_load_hinting_set(Evas *evas, void *font, int hinting); -void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events); -void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b); -void _evas_object_text_rehint(Evas_Object *obj); -void _evas_object_textblock_rehint(Evas_Object *obj); - -extern int _evas_alloc_error; -extern int _evas_event_counter; - -struct _Evas_Imaging_Image -{ - RGBA_Image *image; -}; - -struct _Evas_Imaging_Font -{ - RGBA_Font *font; -}; - -int evas_async_events_init(void); -int evas_async_events_shutdown(void); -int evas_async_target_del(const void *target); - -void _evas_preload_thread_init(void); -void _evas_preload_thread_shutdown(void); -Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data), - void (*func_end)(void *data), - void (*func_cancel)(void *data), - const void *data); -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); -EAPI const char *_evas_module_libdir_get(void); - -Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, - void *context, void *surface, - int off_x, int off_y, int mapped, - int ecx, int ecy, int ecw, int ech); -void evas_render_invalidate(Evas *e); -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); - -Eina_List *evas_module_engine_list(void); - -/* for updating touch point list */ -void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y); -void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state); -void _evas_touch_point_remove(Evas *e, int id); - -/****************************************************************************/ -/*****************************************/ -/********************/ -#define MPOOL 1 - -#ifdef MPOOL -typedef struct _Evas_Mempool Evas_Mempool; - -struct _Evas_Mempool -{ - int count; - int num_allocs; - int num_frees; - Eina_Mempool *mp; -}; -# define EVAS_MEMPOOL(x) \ - static Evas_Mempool x = {0, 0, 0, NULL} -# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \ - do { \ - if (!x.mp) { \ - x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \ - if (!x.mp) { \ - return ret; \ - } \ - } \ - } while (0) -# define EVAS_MEMPOOL_ALLOC(x, siz) \ - eina_mempool_malloc(x.mp, sizeof(siz)) -# define EVAS_MEMPOOL_PREP(x, p, siz) \ - do { \ - x.count++; \ - x.num_allocs++; \ - memset(p, 0, sizeof(siz)); \ - } while (0) -# define EVAS_MEMPOOL_FREE(x, p) \ - do { \ - eina_mempool_free(x.mp, p); \ - x.count--; \ - x.num_frees++; \ - if (x.count <= 0) { \ - eina_mempool_del(x.mp); \ - x.mp = NULL; \ - x.count = 0; \ - } \ - } while (0) -#else -# define EVAS_MEMPOOL(x) -# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) -# define EVAS_MEMPOOL_PREP(x, p, siz) -# define EVAS_MEMPOOL_ALLOC(x, siz) \ - calloc(1, sizeof(siz)) -# define EVAS_MEMPOOL_FREE(x, p) \ - free(p) -#endif -/********************/ -/*****************************************/ -/****************************************************************************/ - -#define EVAS_API_OVERRIDE(func, api, prefix) \ - (api)->func = prefix##func -#define EVAS_API_RESET(func, api) \ - (api)->func = NULL - -#include "evas_inline.x" - -#ifdef __cplusplus -} -#endif -#endif diff --git a/libraries/evas/src/lib/main.c b/libraries/evas/src/lib/main.c deleted file mode 100644 index f999889..0000000 --- a/libraries/evas/src/lib/main.c +++ /dev/null @@ -1,150 +0,0 @@ -#include "evas_common.h" -#include "evas_private.h" - -static Evas_Version _version = { VMAJ, VMIN, VMIC, VREV }; -EAPI Evas_Version *evas_version = &_version; - -int _evas_alloc_error = 0; -static int _evas_debug_init = 0; -static int _evas_debug_show = 0; -static int _evas_debug_abort = 0; - -EAPI Evas_Alloc_Error -evas_alloc_error(void) -{ - return _evas_alloc_error; -} - -/* free cached items only in ram for speed reasons. return 0 if can't free */ -int -evas_mem_free(int mem_required __UNUSED__) -{ - return 0; -} - -/* start reducing quality of images etc. return 0 if can't free anything */ -int -evas_mem_degrade(int mem_required __UNUSED__) -{ - return 0; -} - -void * -evas_mem_calloc(int size) -{ - void *ptr; - - ptr = calloc(1, size); - if (ptr) return ptr; - MERR_BAD(); - while ((!ptr) && (evas_mem_free(size))) ptr = calloc(1, size); - if (ptr) return ptr; - while ((!ptr) && (evas_mem_degrade(size))) ptr = calloc(1, size); - if (ptr) return ptr; - MERR_FATAL(); - return NULL; -} - -void -evas_debug_error(void) -{ - if (!_evas_debug_init) - { - if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; - if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; - _evas_debug_init = 1; - } - if (_evas_debug_show) - CRIT("Evas Magic Check Failed!!!"); -} - -void -evas_debug_input_null(void) -{ - if (!_evas_debug_init) - { - if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; - if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; - _evas_debug_init = 1; - } - if (_evas_debug_show) - CRIT("Input object pointer is NULL!"); - if (_evas_debug_abort) abort(); -} - -void -evas_debug_magic_null(void) -{ - if (!_evas_debug_init) - { - if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; - if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; - _evas_debug_init = 1; - } - if (_evas_debug_show) - CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!"); - if (_evas_debug_abort) abort(); -} - -void -evas_debug_magic_wrong(DATA32 expected, DATA32 supplied) -{ - if (!_evas_debug_init) - { - if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; - if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; - _evas_debug_init = 1; - } - if (_evas_debug_show) - CRIT("Input object is wrong type\n" - " Expected: %08x - %s\n" - " Supplied: %08x - %s", - expected, evas_debug_magic_string_get(expected), - supplied, evas_debug_magic_string_get(supplied)); - if (_evas_debug_abort) abort(); -} - -void -evas_debug_generic(const char *str) -{ - if (!_evas_debug_init) - { - if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1; - if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; - _evas_debug_init = 1; - } - if (_evas_debug_show) - CRIT("%s", str); - if (_evas_debug_abort) abort(); -} - -const char * -evas_debug_magic_string_get(DATA32 magic) -{ - switch (magic) - { - case MAGIC_EVAS: - return "Evas"; - case MAGIC_OBJ: - return "Evas_Object"; - case MAGIC_OBJ_RECTANGLE: - return "Evas_Object (Rectangle)"; - case MAGIC_OBJ_LINE: - return "Evas_Object (Line)"; - case MAGIC_OBJ_POLYGON: - return "Evas_Object (Polygon)"; - case MAGIC_OBJ_IMAGE: - return "Evas_Object (Image)"; - case MAGIC_OBJ_TEXT: - return "Evas_Object (Text)"; - case MAGIC_OBJ_SMART: - return "Evas_Object (Smart)"; - case MAGIC_EVAS_GL: - return "Evas_GL"; - case MAGIC_MAP: - return "Evas_Map"; - default: - return ""; - }; - return ""; -} -- cgit v1.1